rajat
rajat

Reputation: 217

How to Clear the cache token in MSAL SPA?

I have the functionality when the user doesn't accept the Permission ( At the first time login) I am redirecting it to Signin page. Since the token is cached it is constantly showing the Permission page.

Is there a way to clear the token which is cached ?

Upvotes: 5

Views: 8472

Answers (1)

juunas
juunas

Reputation: 58863

I don't think that's MSAL that is caching there, it's Azure AD. You can specify a prompt query parameter to the request to change what Azure AD does: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow#send-the-sign-in-request (scroll down to the table and find the prompt parameter for the options).

For example prompt=select_account will force an account chooser.

Upvotes: 6

Related Questions