File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ describe('URLs', () => {
114
114
115
115
const oauthUrl = getOauthUrl ( ) ;
116
116
117
- expect ( oauthUrl ) . toBe ( 'https://qa.deriv.com/oauth2/authorize?app_id=67890&l=EN&& brand=deriv' ) ;
117
+ expect ( oauthUrl ) . toBe ( 'https://qa.deriv.com/oauth2/authorize?app_id=67890&l=EN&brand=deriv' ) ;
118
118
} ) ;
119
119
120
120
it ( 'should return the default OAuth URL if appId and serverUrl are not set' , ( ) => {
@@ -136,7 +136,7 @@ describe('URLs', () => {
136
136
137
137
const oauthUrl = getOauthUrl ( ) ;
138
138
139
- expect ( oauthUrl ) . toBe ( 'https://qa.deriv.com/oauth2/authorize?app_id=67890&l=EN&& brand=deriv' ) ;
139
+ expect ( oauthUrl ) . toBe ( 'https://qa.deriv.com/oauth2/authorize?app_id=67890&l=EN&brand=deriv' ) ;
140
140
} ) ;
141
141
} ) ;
142
142
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ export const requestOidcAuthentication = async (options: RequestOidcAuthenticati
133
133
134
134
await userManager . signinRedirect ( {
135
135
extraQueryParams : {
136
- brand : " deriv"
136
+ brand : ' deriv' ,
137
137
} ,
138
138
} ) ;
139
139
return { userManager } ;
@@ -287,14 +287,15 @@ export const OAuth2Logout = async (options: OAuth2LogoutOptions) => {
287
287
const oidcEndpoints = localStorage . getItem ( 'config.oidc_endpoints' ) || '{}' ;
288
288
289
289
let logoutUrl = getOAuthLogoutUrl ( ) || JSON . parse ( oidcEndpoints ) . end_session_endpoint ;
290
- const userManager = await createUserManager ( {
291
- redirectCallbackUri : options . redirectCallbackUri ,
292
- postLogoutRedirectUri : options . postLogoutRedirectUri ,
293
- } ) ;
294
- const userState = await userManager . getUser ( ) ;
295
- if ( userState ?. id_token ) {
296
- logoutUrl += `?id_token_hint=${ userState . id_token } &post_logout_redirect_uri${ options . postLogoutRedirectUri } ` ;
297
- }
290
+ // NOTE: Comment this out once front channel is implemented
291
+ // const userManager = await createUserManager({
292
+ // redirectCallbackUri: options.redirectCallbackUri,
293
+ // postLogoutRedirectUri: options.postLogoutRedirectUri,
294
+ // });
295
+ // const userState = await userManager.getUser();
296
+ // if (userState?.id_token) {
297
+ // logoutUrl += `?id_token_hint=${userState.id_token}&post_logout_redirect_uri=${options.postLogoutRedirectUri}`;
298
+ // }
298
299
299
300
const cleanup = ( ) => {
300
301
const iframe = document . getElementById ( 'logout-iframe' ) as HTMLIFrameElement ;
You can’t perform that action at this time.
0 commit comments