gpt4 book ai didi

Azure AD B2C - 从所有 session 中注销用户

转载 作者:行者123 更新时间:2023-12-04 18:29:26 24 4
gpt4 key购买 nike

我有 3 个网站使用单个 B2C 租户。我被要求进行设置,以便当用户退出一个网站时,退出所有网站。

如果他们的帐户被删除,情况也是如此。

我认为我必须在每个请求上引入对 Azure 的调用,以确定用户是否仍然登录,但据我所知,没有一个 Graph API 端点可以让我确定用户状态。

我是否以错误的方式思考这个问题?有没有办法使用 B2C、Graph API、Active Directory 客户端等轻松做到这一点?

例如,在设置 OpenIdConnectAuthenticationOptions 时可能有一个选项。

最佳答案

根据Azure Document上的描述:

While directing the user to the end_session_endpoint will clear some of the user's single sign-on state with Azure AD B2C, it will not sign the user out of the user's social identity provider (IDP) session. If the user selects the same IDP during a subsequent sign-in, they will be reauthenticated, without entering their credentials. If a user wants to sign out of your B2C application, it does not necessarily mean they want to sign out of their Facebook account entirely. However, in the case of local accounts, the user's session will be ended properly.

因此您可以直接使用end_session_endpoint。您可以在 b2c_1_sign_in 策略端点的元数据文档中找到它,例如:

https://login.microsoftonline.com/fabrikamb2c.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=b2c_1_sign_in

您可以引用Azure Active Directory B2C: Web sign-in with OpenID Connect了解更多信息。

如有任何进一步的疑问,请随时告诉我。

关于Azure AD B2C - 从所有 session 中注销用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41187094/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com