IdentityModel/IdentityModel.OidcClient.Samples

Unable to logout using Maui

Closed this issue · 2 comments

Calling await _client.LogoutAsync(); does not remove the client credentials. The next time the app is run the previous user remains logged in, and their access token is returned.

Steps to reproduce:
Run the MauiApp1 sample on an Android device and add a logout button.

private async void OnLogoutClicked(object sender, EventArgs e)
{
    await _client.LogoutAsync();
}

Press the Logout button.
Restart the app
Press the login button.

This is a serious flaw. Is there a way to clear the client credentials

I think what you really mean is that the user session is not cleared?

This means that for some reason the session cookies are not deleted by the IdP. That's where I would start investigating.

I think what you really mean is that the user session is not cleared?

This means that for some reason the session cookies are not deleted by the IdP. That's where I would start investigating.

@leastprivilege, thank you. You were (as usual) correct about the IdP.