PostLogoutRedirectUri not work #1121
Comments
At logout the client must also pass the id token via the is token hint param. The katana middleware doesn't do this automatically. Check the oidc katana sample. -Brock
|
I try to add this to the client but not work: Notifications = new OpenIdConnectAuthenticationNotifications
{
SecurityTokenValidated = async n =>
{
var id = n.AuthenticationTicket.Identity;
id.AddClaim(new Claim("id_token", n.ProtocolMessage.IdToken));
n.AuthenticationTicket = new AuthenticationTicket(
id,
n.AuthenticationTicket.Properties);
},
RedirectToIdentityProvider = async n =>
{
if (n.ProtocolMessage.RequestType == OpenIdConnectRequestType.LogoutRequest)
{
var idTokenHint = n.OwinContext.Authentication.User.FindFirst("id_token").Value;
n.ProtocolMessage.IdTokenHint = idTokenHint;
}
}
} |
Then the only other suggestion is to check the identity server logs. -Brock
|
I solve this problem thanks. |
I'm trying to implement the same functionality, but having hard time getting id_token. Could you post your solution here? |
I would also be interested in seeing how you got this working. Thanks. |
For me it was combination of 3 things to make it work:
|
Yes this is the steps. public ActionResult Signout()
{
if (Request.GetOwinContext().Authentication.User.Identity.IsAuthenticated)
{
Request.GetOwinContext().Authentication.SignOut();
}
return Redirect(~/");
} |
Just to clarify what @totpero said - You must make sure you have an entry in your Client()'s PostLogoutRedirectUri collection which corresponds to the PostLogoutRedirectUri you're attempting to redirect to from your app. If you don't, you'll see an "Invalid post logout URI" error in your log. |
Hello,
I try to EnablePostSignOutAutoRedirect and not works. How to set this options?
On the server i have this settings:
The clint settings:
The server config:
And on my clint app i have this:
What is wrong?
The logout redirect link is not show if i only set PostLogoutRedirectUri on the client app and to set PostLogoutRedirectUris on the server Client?
Need to do something else?
The text was updated successfully, but these errors were encountered: