【发布时间】:2019-01-10 04:18:59
【问题描述】:
我想在用户访问 B2C 的忘记密码页面时添加自定义消息。当他们输入他们的电子邮件地址并且找不到他们的“电话号码”时,它应该只是在“继续/取消”按钮下显示一条错误消息,上面写着“未注册,联系支持”(也可以在电子邮件文本框上)如果在它下面做太多事情,正常的错误消息就会出现)
我有用户旅程和编排步骤来检测电话号码是否存在的先决条件。但不确定如何执行此自定义错误消息。以下旅程的顺序 2 需要该步骤来显示该错误消息并完成(不运行进一步的步骤)
<UserJourney Id="PasswordReset">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="PasswordResetUsingEmailAddress" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="true">
<Value>phonenumber</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddressOTP" />
</ClaimsExchanges>
</OrchestrationStep>
..........
我认为我们可以通过结合使用自定义配置文件中的 UserMessageIfClaimsPrincipalDoesNotExist 和 RaiseErrorIfClaimsPrincipalDoesNotExist 来做到这一点。但只是寻找一个捆绑的例子来把这些部分放在一起。
【问题讨论】:
标签: azure-ad-b2c