File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " german-api" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " " ,
55 "author" : " " ,
66 "private" : true ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { AuthService } from './auth.service';
1313
1414@Controller ( 'auth' )
1515export class AuthController {
16- constructor ( private authService : AuthService ) { }
16+ constructor ( private authService : AuthService ) { }
1717
1818 @Get ( 'google' )
1919 @UseGuards ( AuthGuard ( 'google' ) )
@@ -40,7 +40,9 @@ export class AuthController {
4040 } ) ;
4141
4242 // Redirect to Frontend (deliver token)
43- res . redirect ( `http://localhost:3000/auth/callback?${ params . toString ( ) } ` ) ;
43+ const frontendUrls = ( process . env . FRONTEND_URL || 'http://localhost:3000' ) . split ( ',' ) ;
44+ const primaryUrl = frontendUrls [ 0 ] . trim ( ) ;
45+ res . redirect ( `${ primaryUrl } /auth/callback?${ params . toString ( ) } ` ) ;
4446 }
4547
4648 @Patch ( 'language' )
Original file line number Diff line number Diff line change 11{
22 "name" : " german-app" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "private" : true ,
55 "scripts" : {
66 "dev" : " next dev" ,
You can’t perform that action at this time.
0 commit comments