AuthError: Unexpected error in authentication.: Hash does not contain state.
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Browser:
- Chrome version XX
- Firefox version XX
- IE version XX
- Edge version XX
- Safari version XX
Library version
1.0.0
Current behavior
Steps to reproduce.
- Attempt a B2C login flow using loginRedirect
- When asked to log in, click “reset password” (This will redirect back to the SPA)
- Catch the AuthError (AADB2C90118) and redirect the user to the password reset flow
- Click “cancel” on the password reset flow. (This redirects back to the SPA)
now calling new UserAgentApplication(config)
will error with the message:
AuthError: Unexpected error in authentication.: Hash does not contain state.
At this point you can’t recover. Even if you catch the error, clear session storage, and try to call new UserAgentApplication(config)
it will still error again.
Expected behavior
After redirecting back to the SPA after the user clicks “cancel” msal should trigger your errorReceivedCallback and give it an error that can be recovered from.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:24 (4 by maintainers)
Top Results From Across the Web
azure ad b2c - Error in Angular MSAL AuthError: Unexpected ...
ERROR AuthError : Unexpected error in authentication.: Hash does not contain state. My b2C config looks exactly like this in sample. Any ...
Read more >Hash does not contain state - Blazor Forums
Blazor MSAL Auntentication library error “Unexpected error in authentication.: Hash does not contain state”. Posted 2 years ago by preetiislur.
Read more >BrowserAuthError | microsoft-authentication-libraries-for-js
Creates an error thrown when the state value in the hash does not match the interaction type of the API attempting to consume...
Read more >Configure third party OAuth IdP authentication - Microsoft Learn
In this article, learn Teams authentication tabs Microsoft Azure AD, ... else { // Unexpected condition: hash does not contain error or ...
Read more >Job 6 | lib/msal-browser/src/error/BrowserAuthError.ts | Coveralls
1 /*
3 * Licensed under the MIT License.
4 */
6 import from "@azure/msal‑common" 17×
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please re-open this issue. Getting the same problem, setting
storeAuthStateInCookie
totrue
does not resolve the problem.Same issue here with Google Chrome (build 80.0.3987.122). Regular login works, but when using a custom Sign Up policy we receive the
AuthError: Unexpected error in authentication.: Hash does not contain state.
error.