Logout does not clear session

Christoph Huber 126 Reputation points
2022-09-05T13:54:14.44+00:00

We use Azure B2C with custom policies and MSAL 2.0 for javascript. When I try to logout, Azure does not clear my session. The next authentication request still returns the same ID token. This happens with Firefox, but not with Chrome. Any idea, why this browser-specific issue occurs?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,945 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MJ Meyer 1 Reputation point
    2022-09-06T01:58:23.55+00:00

    We were getting the same issue. The only "fix" we could find is manually clearing the local storage and navigating to https://{authDomain}/{tenant}/b2c_1a_signup_signin/oauth2/v2.0/logout?post_logout_redirect_uri={redirectUrl} instead of using the library's logout method.

    Just doing the one or the other (clearing local storage or navigating to the logout url) doesn't work in FF, although it does in Chrome.

    We tried this, cause I noticed that in Chrome the logout url gets called, but it doesn't happen in FF.

    Hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.