File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -556,8 +556,9 @@ export class AuthenticationCore<T> {
556
556
"No sign-in redirect URL has been found either. "
557
557
) ;
558
558
}
559
+ const queryParams : URLSearchParams = new URLSearchParams ( ) ;
559
560
560
- let parameter : string = `client_id= ${ configData . clientID } ` ;
561
+ queryParams . set ( "post_logout_redirect_uri" , callbackURL ) ;
561
562
562
563
if ( configData . sendIdTokenInLogoutRequest ) {
563
564
const idToken : string = ( await this . _dataLayer . getSessionData ( userID ) ) ?. id_token ;
@@ -569,16 +570,14 @@ export class AuthenticationCore<T> {
569
570
"No ID token could be found. Either the session information is lost or you have not signed in."
570
571
) ;
571
572
}
572
- parameter = `id_token_hint=${ idToken } ` ;
573
+ queryParams . set ( "id_token_hint" , idToken ) ;
574
+ } else {
575
+ queryParams . set ( "client_id" , configData . clientID ) ;
573
576
}
574
577
575
- const logoutCallback : string =
576
- `${ logoutEndpoint } ?` +
577
- parameter +
578
- `&post_logout_redirect_uri=${ callbackURL } &state=` +
579
- SIGN_OUT_SUCCESS_PARAM ;
578
+ queryParams . set ( "state" , SIGN_OUT_SUCCESS_PARAM ) ;
580
579
581
- return logoutCallback ;
580
+ return ` ${ logoutEndpoint } ? ${ queryParams . toString ( ) } ` ;
582
581
}
583
582
584
583
public async clearUserSessionData ( userID ?: string ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments