We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52df57a commit 36362eaCopy full SHA for 36362ea
lib/auth.guard.ts
@@ -46,7 +46,7 @@ function createAuthGuard(type?: string | string[]): Type<CanActivate> {
46
};
47
const [request, response] = [
48
this.getRequest(context),
49
- context.switchToHttp().getResponse()
+ this.getResponse(context)
50
];
51
const passportFn = createPassportContext(request, response);
52
const user = await passportFn(
@@ -63,6 +63,10 @@ function createAuthGuard(type?: string | string[]): Type<CanActivate> {
63
return context.switchToHttp().getRequest();
64
}
65
66
+ getResponse<T = any>(context: ExecutionContext): T {
67
+ return context.switchToHttp().getResponse();
68
+ }
69
+
70
async logIn<TRequest extends { logIn: Function } = any>(
71
request: TRequest
72
): Promise<void> {
0 commit comments