问题
I'm using the Identity oidc-client-js library and calling
this.usermanager.signoutRedirect({ somedata: someObject.Id });
Then in the logout endpoint I do this with the IdentityServer interaction service
var logoutRequest= await _interaction.GetLogoutContextAsync(logoutId);
I would have expected the somedata to show up in the Parameters property of the LogoutRequest but it doesn't. So how do I add some extra parameters to the signout?
I noticed I can return a { state: 'somedata' } but I don't actually know how to retrieve that from the LogoutRequest object either. So if I can't add my own parameters how do I retrieve the state data?
Thanks!
回答1:
you gotta do this
this.usermanager.signoutRedirect({ extraQueryParams: { 'key': 'value' } });
Then they'll show up in the Parameters property in the LogoutRequest
来源:https://stackoverflow.com/questions/60643257/how-do-you-add-parameters-to-an-identityserver-logoutrequest-model