我正在为我现在工作的公司的应用程序实施安全性。我在用着@azure/msal-angular@2.0.2,@azure/msal-browser@2.16.1。我按照此处找到的示例进行操作
,并使其适用于第一个应用程序。我继续为下一个应用程序实现它,它基本上是相同的,只是与不同的 api 通信,但复杂性是相同的。可能做错了什么之后,我不断收到错误:
core.js:6157 ERROR Error: Uncaught (in promise): BrowserAuthError: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.
BrowserAuthError: interaction_in_progress: Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors.
Run Code Online (Sandbox Code Playgroud)
我发现其他几篇文章说要清除缓存、存储等...但都不起作用。它所做的只是提示我再次登录,只是用相同的条目填充 sessionStorage,其中包含msal.442edcf7-9e0c-469b-93fb-daa1839724bd.interaction.status interaction_in_progress. 据我所知,我已经尝试了我发现的一切。AzureAD 本身的解决方案也不起作用。
我对此很陌生,所以我可能错过了一些简单的事情,如果是这样,我很抱歉。
我的代码可以在下面找到。
角度版本
11.0.2
应用程序模块.ts
import { …Run Code Online (Sandbox Code Playgroud)