最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to Clear the cache token in MSAL SPA? - Stack Overflow

programmeradmin1浏览0评论

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 ?

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 ?

Share Improve this question asked Aug 24, 2021 at 13:02 rajatrajat 2173 silver badges13 bronze badges 2
  • 2 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: learn.microsoft./en-us/azure/active-directory/develop/… (scroll down to the table and find the prompt parameter for the options) – juunas Commented Aug 24, 2021 at 13:11
  • Cool. It worked. Thanks – rajat Commented Aug 24, 2021 at 13:30
Add a ment  | 

1 Answer 1

Reset to default 6

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./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.

发布评论

评论列表(0)

  1. 暂无评论