diff --git a/src/domains/auth/AuthController.ts b/src/domains/auth/AuthController.ts index d626535..4091b14 100644 --- a/src/domains/auth/AuthController.ts +++ b/src/domains/auth/AuthController.ts @@ -66,7 +66,11 @@ export class AuthController { // After successful authentication at google page... @Get("/google/callback") - @UseBefore(passport.authenticate("google")) + @UseBefore( + passport.authenticate("google", { + session: false, + }) + ) async googleCallback(@Req() req: MyAuthRequest, @Res() res: Response) { const redirectTo = await this.authService.saveGoogleTokenAndReturnRedirectURL(req.user) diff --git a/src/server.ts b/src/server.ts index 395f911..d0b91a8 100644 --- a/src/server.ts +++ b/src/server.ts @@ -138,6 +138,7 @@ dataSource }) ) app.use(cookieParser()) + // initialize passport app.use(passport.initialize())