react-aad: Forgot password seems to be unimplemented or missing from documentation
Please provide us with the following information:
This issue is for a: (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
Configure Azure with a signin sign up user flow Configure Azure with a Password reset user flow Look for documentation on where to set the forgot password user flow
Results: Nothing found
Any log messages given by the failure
Not applicable
Expected/desired behavior
I would expecty full documentation on how to configure
OS and Version?
Not applicable
Versions
0.4.9
Mention any other details that might be useful
I briefly scanned through the code and couldn’t see anything that looked applicable to the forgot password user flow, I recognize I might just not have looked hard enough, but regardless. I think this should be documented (or implemented if it’s not)
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 1
- Comments: 15 (1 by maintainers)
I used the functions exposed by MsalAuthProvider.
My solution is just to dig into the exposed MSAL functions and do the following:
I think my sample should be extended to catch the returned token after Password Reset to prevent a second login prompt to the user. Maybe I’ll have time to look at that within the next few days.
Hope that helps.
I just ended up writing this code to hack my way around resetPassword handling for the redirect loginType:
Hope this solution might help some people till the library gets a fix
authProvider.registerErrorHandler
and changeauthority
to reset password policy by usingauthProvider.setAuthenticationParameters({ authority: resetPolicyURL})
.if tfp satisfies resetpasswordpolicy based token, then use authProvider and make a call
authProvider.logout()
msal*
. This is needed otherwise after login you will get 431 error as cookies size will increase because of more iframe requests failed.Restriction:
Allow all third party cookies
Prevent cross-site tracking
Thank you very much for your workaround @Premkumar-Shanmugam, it works perfectly.
I just wish we had a way to do it ‘natively’ without having so many redirects back and forth…
Has anyone found a workaround for this issue when using the redirect flow. When the reset password flow is finished on the azure side, it redirects back to my React app
/b2c_1_passwordreset/oauth2/v2.0/authorize
/b2c_1_signin/oauth2/v2.0/authorize
causing the refresh token iframe to fail with ` in a frame because it set ‘X-Frame-Options’ to ‘deny’.
I ended up with following solution,