AADB2C 嵌入式密码重置:本地帐户发现未被触发

问题描述 投票:0回答:2

我们正在实施“嵌入式密码重置”,这是新推荐的做法。一旦我们点击 Forgot your password? 链接,重置子旅程就会按预期被调用。

重置子旅程总是跳过本地帐户发现步骤,用户验证电子邮件以访问其帐户信息,并直接跳转到屏幕输入新密码 - 然后新密码输入失败,因为没有帐户将新密码写入。

我们的重置密码历程如下:

<SubJourney Id="PasswordReset" Type="Call"> <OrchestrationSteps> <OrchestrationStep Order="1" Type="ClaimsExchange"> <!-- This orchestration step never occurs. The user is never prompted for their email address. --> <ClaimsExchanges> <ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" /> </ClaimsExchanges> </OrchestrationStep> <OrchestrationStep Order="2" Type="ClaimsExchange"> <ClaimsExchanges> <ClaimsExchange Id="NewCredentials" nicalProfileReferenceId="LocalAccountWritePasswordUsingObjectId" /> </ClaimsExchanges> </OrchestrationStep> </OrchestrationSteps> </SubJourney>

到目前为止,我们的代码是直接从教程和示例代码中提取的。我们该如何解决这个问题,还有其他人遇到过同样的问题吗?

azure azure-active-directory azure-ad-b2c azure-ad-b2c-custom-policy
2个回答
0
投票

这是B2C系统中的一个bug——初始组合登录和 注册步骤似乎设置了
email

声明,即使用户点击了 “忘记密码”链接。这

LocalAccountDiscoveryUsingEmailAddress
配置文件尝试使用 (空白)声明不提示用户输入地址,跳转 到密码写入步骤,但没有拿起帐户来写入 密码为.我们通过创建新的 resetEmail 声明来解决这个问题 仅由帐户发现和密码写入配置文件使用。

    


0
投票

您的代码:

<OrchestrationStep Order="2" Type="ClaimsExchange"> <ClaimsExchanges> <ClaimsExchange Id="NewCredentials" nicalProfileReferenceId="LocalAccountWritePasswordUsingObjectId" /> </ClaimsExchanges> </OrchestrationStep>

ClaimsExchange 技术配置文件将“nicalProfileReferenceId”作为属性,而不是 
TechnicalProfileReferenceId

© www.soinside.com 2019 - 2024. All rights reserved.