【发布时间】:2021-11-11 11:28:19
【问题描述】:
我正在关注带有 msal 和 AADB2C 的 React 示例。
如果用户在我的signIn 流程中单击“忘记了我的密码”,我想运行reset password flow。从here看到我需要处理这个案子:
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”
【问题讨论】:
-
你是怎么解决的?
标签: reactjs azure-active-directory msal.js msal-react