Skip to content

Commit f021fb0

Browse files
authored
Merge pull request DuendeArchive#305 from chaffeqa/patch-1
signoutRedirect respect post_logout_redirect_uri
2 parents 2262802 + bd9125f commit f021fb0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/UserManager.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,18 @@ export default class UserManager extends OidcClient {
255255
return user;
256256
});
257257
}
258-
signoutRedirect(args) {
258+
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)