Closed mellis481 closed 3 years ago
Hi,
Did you try to call userManager.signoutRedirect({post_logout_redirect_uri: 'http://whatever.example.com/some/path'})
. I guess it could work according to the code:
https://github.com/IdentityModel/oidc-client-js/blob/a8a70ce68bd07373abd7d33e016a97adc5d204bc/src/UserManager.js#L433-L447
@ghostd That works. Thanks!
I have a
/loggedout
page which is set in client settings as thepost_logout_redirect_uri
. This is the page users will see when they manually log out. We're in the process of adding an idle timeout and want the messaging on the/loggedout
page to be different if the user was timed out vs. logged out. I, therefore, am hoping to be able to add a query string (eg.?timedout=true
) to the/loggedout
post-logout redirect or, alternatively, provide a different URL (eg./timedout
).I did some digging and came across
extraQueryParams
which can be passed in touserManager.signoutRedirect()
, but realized that this will not do what I need it to do. This adds a query string to the entire endsession redirect URL, not to thepost_logout_redirect_uri
query string parameter which is part of that URL.I also tried to set
window.location
in UserManager callback (userManager.signoutRedirect().then()
), but that ends up firing before the redirect to the IdP's end session page occurs so the session is never ended.Is there any way to modify the
post_logout_redirect_uri
at run-time to accomplish what I'm trying to accomplish? I assume I can create a secondUserManager
instance, but that isn't ideal to have to do that and I'm actually not sure if having multipleUserManager
instances will cause undesirable behavior.