React MSAL:如何从所有设备注销?
我们有一个应用程序,其中我们使用 msal-reactct 用于login/logout。
是否有一种方法可以在登录时登录用户登录的所有设备?
不幸的是,官方文档关于这个。
我们也有登录的问题,因此用户必须在新的选项卡中再次登录(在打开不同的微观前端时 - 所有这些都使用相同的登录会话),尽管令牌存储在本地存储中。
希望有人可以在这里提供帮助或提供文档。
We have an application where we use msal-react for login/logout.
Is there a way to log out of all devices with which a user is logged in when logging out?
Unfortunately, nothing can be found in the official documentation about this.
We also have a problem with login, so that the user has to log in again in a new tab (when opening different micro frontends - which all use the same login session), although the token is stored in local storage.
Hope someone can help here or provide a documentation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您必须使用 msal-react 的应用程序注销所有设备时,您可以肯定地配置所需的应用程序以登录所有在应用程序中的登录实例,如下所示:
通过这种方式,您可以确保您的React应用程序已从Azure Active Directory登录,并且所有设备都将用户登录的信息汇总。
使用弹出窗口签名:
类似地,如果您使用重定向方法参考用于从应用程序中登录的方法,则必须通过设置Postlogoutredirecturi来配置其在登录后应重定向到的URI。该URI应在您的申请注册中注册为重定向URI。
有关更多信息,请参考下面的文档链接:
https://learn.microsoft.com/en-us/azure/active-directory/directory/develip/scenario-scenario-spa-sign-sign-sign-sign-sign-sign-sign-sign-sign-sign-sign-sign-在?tabs = react#签名 - with-a-pop-up-window
When you have to logout of all devices through an application using msal-react, then you can surely configure the required application for signing out of all instances of logged in application as below:
In this way, you can ensure that your react application has logged out of Azure Active Directory and all devices reciprocate the information that the user has logged out.
Signing out with a pop-up window:
Similarly, if you refer to the method for signing out of the application using the redirect method, you will have to configure the URI to which it should redirect after sign-out by setting postLogoutRedirectUri. This URI should be registered as a redirect URI in your application registration.
For more information, kindly refer to the documentation link below:
https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-sign-in?tabs=react#sign-out-with-a-pop-up-window