Skip to content

Commit 8c4f9e0

Browse files
author
Quinn Chaffee
authored
signoutRedirect respect post_logout_redirect_uri
Although the popup version respected the argument, the redirect method did not.
1 parent a91ea24 commit 8c4f9e0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/UserManager.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,16 @@ export default class UserManager extends OidcClient {
257257
}
258258
signoutRedirect(args) {
259259
Log.debug("UserManager.signoutRedirect");
260+
let postLogoutRedirectUri = args.post_logout_redirect_uri || this.settings.post_logout_redirect_uri;
261+
if (postLogoutRedirectUri){
262+
args.post_logout_redirect_uri = postLogoutRedirectUri;
263+
// we're putting a dummy entry in here because we
264+
// need a unique id from the state for notification
265+
// to the parent window, which is necessary if we
266+
// plan to return back to the client after signout
267+
// and so we can close the popup after signout
268+
args.state = args.state || {};
269+
}
260270
return this._signoutStart(args, this._redirectNavigator).then(()=>{
261271
Log.info("signoutRedirect successful");
262272
});

0 commit comments

Comments
 (0)