azure-active-directory - Azure AD B2C 登录自定义策略记住用户
问题描述
我们在 Azure AD B2C 中有一个登录自定义策略设置,客户使用它来登录我们的应用程序。在标准 B2C 策略中,用户会被记住,并提供一个菜单,其中包含从特定机器登录的电子邮件地址列表(以及忘记它们的选项),如下面的屏幕截图所示:
我们的自定义登录策略有效,但用户每次都必须从他们的机器上重新输入他们的电子邮件地址。我们如何使用自定义策略实现相同的行为?
以下是技术简介:
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="SignUpTarget">SignUpWithLogonEmailExchange</Item>
<Item Key="setting.operatingMode">Email</Item>
<Item Key="setting.showSignupLink">False</Item>
<Item Key="setting.showContinueButton">True</Item>
<Item Key="setting.showCancelButton">True</Item>
<Item Key="EnforceEmailVerification">False</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
</Metadata>
<IncludeInSso>false</IncludeInSso>
<InputClaims>
<InputClaim ClaimTypeReferenceId="signInName" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
<OutputClaim ClaimTypeReferenceId="password" Required="true" />
<OutputClaim ClaimTypeReferenceId="objectId" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" />
</OutputClaims>
<ValidationTechnicalProfiles>
<ValidationTechnicalProfile ReferenceId="login-NonInteractive" />
</ValidationTechnicalProfiles>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>
编辑:
在试用了当前在 Azure AD B2C 中处于预览阶段的新“用户流程”之后,似乎提供了两种不同版本的登录用户旅程:
- 登录:不允许 UI 自定义(除了“公司品牌”功能),并且与我在上面的屏幕截图中报告的行为一致。
- 登录 v2:允许使用自定义 cshtml 页面进行 UI 自定义,并且与我在使用自定义策略时观察到的行为一致。目前,从现有的内置策略中看不到或无法访问这种类型的登录用户流程。
因此, Sign in v2似乎是在自定义策略中用于登录用户旅程的版本,因为它是允许 UI 自定义的版本。
解决方案
SignInV1 与 SignInV2
内置策略已更名为用户流。Azure Ad B2C 的新 ui 正在进入 GA。它有一些 v2 用户流,目前处于预览阶段,并将在适当的时候移至 GA。
SignInv1 和 SignInv2 用户流的工作方式有所不同。SignIn v1 以“交互方式”与 Azure Active Directory (AAD) 的默认登录体验联合,该体验具有“让我登录”(KMSI) 功能。SignInV2 具有 UX 可定制性的附加功能。为 B2C 提供与 AAD 的“非交互式”联合。
由于这种可定制性,目前 signinv1 和 v2 - KMSI - 强制密码重置之间存在功能差距。
有计划开发这些功能。
自定义政策
此页面将介绍如何为自定义策略启用 KMSI。 https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-kmsi-custom
推荐阅读
- c++ - 这些特定指针的含义
- java - 为什么〜1在Java中返回-2而不是0?
- java - 如何使用 Java 在 Eclipse 中运行 webdriver 和 JMeter 代码
- stripe-payments - Stripe 与 expo react 原生应用程序集成
- c# - 循环遍历未保存的实体对象并获取除非标量属性外的属性和值
- python - 我的数据清理脚本很慢,关于如何改进的任何想法?
- c# - 为项目中的所有 WCF 服务提供单端点配置?
- c# - Entity Framework 6.0 中的对象查询
- python - 如何使用凭据初始化 Google Cloud Storage
- c++ - C2678 二进制“==”:未找到采用“卡”类型左侧操作数的运算符(或没有可接受的转换)