我正在关注带有 msal 和 AADB2C 的 React 示例。
reset password flow
如果用户在我的流程中单击“忘记了我的密码”,我想运行signIn
。从这里我看到我需要处理这种情况:
if (event.eventType === EventType.LOGIN_FAILURE) {
if (event.error && event.error.errorMessage.indexOf("AADB2C90118") > -1) {
if (event.interactionType === InteractionType.Redirect) {
instance.loginRedirect(b2cPolicies.authorities.forgotPassword);
} else if (event.interactionType === InteractionType.Popup) {
instance.loginPopup(b2cPolicies.authorities.forgotPassword)
.catch(e => {
return;
});
}
}
}
并且forgotPassword
权限是一个URL https://tenantName.b2clogin.com/tenantName.onmicrosoft.com/B2C_1_PasswordReset
,例如。尽管我正在关注这些示例和文档,但我遇到了这个问题,似乎没有任何提及或解决方案:
未处理的拒绝(TypeError):无法在字符串“https://tenantName.b2clogin.com/tenantName.onmicrosoft.com/B2C_1_PasswordReset”上创建属性“authenticationScheme”