azure - 用户关闭并重新打开浏览器后,需要使用 Azure AD B2C 重新进行身份验证

标签 azure azure-active-directory azure-ad-b2c azure-ad-msal msal.js

我有一个 Angular 前端应用程序,它使用 Azure AD B2C 自定义策略(主领域发现)对联合 AAD 用户进行身份验证。 当我使用联合 Azure AD 租户用户登录到应用程序后,关闭此选项卡(无需注销),然后打开一个新选项卡,访问应用程序并登录,该用户可以自动登录。这是 SSO 功能的预期行为。

但是如果我关闭浏览器并重新打开浏览器,当尝试登录时它会要求我输入用户名,似乎 session 丢失并且用户需要重新进行身份验证。

我在 Microsoft 网站上看到了以下文档:

The Keep me signed-in feature extends the session life time through the use of a persistent cookie. The session remains active after the user closes and reopens the browser. The session is revoked only when a user signs out. The Keep me signed-in feature only applies to sign-in with local accounts.

我想知道是否有办法为 Azure AD B2C(联合 Azure AD 租户用户)使用持久 cookie?用户关闭并重新打开浏览器后如何保持 session 事件?

如有任何帮助,我们将不胜感激。谢谢。

最佳答案

根据微软文档。

You can enable Keep Me Signed In (KMSI) functionality for users of your web and native applications that have local accounts in your Azure Active Directory B2C (Azure AD B2C) directory. This feature grants access to users returning to your application without prompting them to reenter their username and password. This access is revoked when a user signs out.

以及先决条件

An Azure AD B2C tenant that is configured to allow local account sign-in. KMSI is unsupported for external identity provider accounts.

因此,目前无法为 Azure AD B2C(联合 Azure AD 租户用户)使用持久 Cookie。

更多信息请引用this .

关于azure - 用户关闭并重新打开浏览器后,需要使用 Azure AD B2C 重新进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64882563/

相关文章:

azure - 在 Azure AD B2C 中启用电子邮件地址或电话号码作为用户标识符

azure - Authorization_RequestDenied。权限不足,无法完成操作。图形API

azure - 无法使用 Facebook 访问 token 登录 Azure 应用服务

windows - Azure Windows VM 扩展正在预配失败状态 VM 代理为 "Ready",但备份在 VM 运行状态 GuestAgentSnapshotTaskStatusError 时失败

c# - AuthenticationBuilder 不包含 AddAzureAd 的定义

azure - 验证错误: "tenantId" is not allowed when using AzureAD for hapi JS route authorization

javascript - 图形安全端点使用 ADALJS 抛出 HTTP 403

azure - 如何使用 B2C 自定义用户流程使用电子邮件填充显示名称

azure - 在Azure发布管道中是否可以一次手动触发多个发布管道?

azure - OneLogin Azure AD 作为目录