Hi @nrodrigu,
You will also need to add an additional notification for RedirectToIdentityProvider
to append the id_token
when you are logging out. Something like this with C#:
private Task BeforeRedirectToIdentityProviderAsync(RedirectToIdentityProviderNotification<OpenIdConnectMessage, OpenIdConnectAuthenticationOptions> redirectToIdentityProviderNotification)
{
// If signing out, add the id_token_hint
if (redirectToIdentityProviderNotification.ProtocolMessage.RequestType == OpenIdConnectRequestType.Logout)
{
if (redirectToIdentityProviderNotification.OwinContext.Authentication.User.FindFirst("id_token") != null)
{
redirectToIdentityProviderNotification.ProtocolMessage.IdTokenHint = redirectToIdentityProviderNotification.OwinContext.Authentication.User.FindFirst("id_token").Value;
}
}
}
...
Notifications = new OpenIdConnectAuthenticationNotifications
{
RedirectToIdentityProvider = BeforeRedirectToIdentityProviderAsync,
....
},
I hope this helps.