File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import { Response } from 'express' ;
21import { Public } from 'omniboxd/auth/decorators/public.auth.decorator' ;
32import { UserId } from 'omniboxd/decorators/user-id.decorator' ;
43import { OAuthService } from 'omniboxd/oauth2/oauth.service' ;
87 Post ,
98 Query ,
109 Body ,
11- Res ,
1210 BadRequestException ,
1311} from '@nestjs/common' ;
1412
@@ -23,7 +21,6 @@ export class OAuthController {
2321 @Query ( 'redirect_uri' ) redirectUri : string ,
2422 @Query ( 'state' ) state : string ,
2523 @UserId ( ) userId : string ,
26- @Res ( ) res : Response ,
2724 ) {
2825 if ( responseType !== 'code' ) {
2926 throw new BadRequestException (
@@ -47,7 +44,10 @@ export class OAuthController {
4744 redirectUrl . searchParams . set ( 'state' , state ) ;
4845 }
4946
50- res . redirect ( redirectUrl . toString ( ) ) ;
47+ // Most browsers will block automatic redirects, so we perform the redirect manually
48+ return {
49+ redirectUrl : redirectUrl . toString ( ) ,
50+ } ;
5151 }
5252
5353 @Public ( )
You can’t perform that action at this time.
0 commit comments