javascript - 如何清除 MSAL SPA 中的缓存 token ?

标签 javascript azure active-directory single-page-application msal.js

当用户不接受权限(首次登录时)时,我具有将其重定向到登录页面的功能。由于 token 已缓存,因此它会不断显示“权限”页面。

有没有办法清除缓存的 token ?

最佳答案

我认为在那里缓存的不是 MSAL,而是 Azure AD。您可以向请求指定提示查询参数以更改 Azure AD 的功能:https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow#send-the-sign-in-request (向下滚动到表格并找到选项的提示参数)。

例如,prompt=select_account 将强制使用帐户选择器。

关于javascript - 如何清除 MSAL SPA 中的缓存 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68908087/

相关文章:

javascript - 如何使javascript创建的图像成为链接

javascript - 为什么这个简单的 JavaScript 秒表不起作用?

azure - 为 VMSS 添加 Azure 诊断设置

c# - LDAP 查询返回不正确的结果

javascript - 从 Meteor 中的地理位置返回邮政编码

javascript - 有没有办法固定下拉列表的宽度?

azure - 在azure逻辑应用中对azure表存储实体进行排序

azure - 如何将数据从azure iot推送到unity 3D

powershell - 使用 PowerShell 脚本导入 CSV 用户

wordpress - WordPress、Node、GitLab 和 CLI 的用户管理系统