I'm following a sample for React w/ msal and AADB2C.
I want to run the reset password flow
if an user clicks "Forgot my password" in my signIn
flow. From here I saw that I need to handle this case:
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;
});
}
}
}
And the forgotPassword
authority is an URL such as https://tenantName.b2clogin.com/tenantName.onmicrosoft.com/B2C_1_PasswordReset
for example. Although I'm following these samples and docs, I've run into this issue and there doesn't seem to be any mentions or solutions to this:
Unhandled Rejection (TypeError): Cannot create property 'authenticationScheme' on string 'https://tenantName.b2clogin.com/tenantName.onmicrosoft.com/B2C_1_PasswordReset'