question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AuthError: Unexpected error in authentication.: Hash does not contain state

See original GitHub issue

Library versions

  • react-aad-msal: ^2.3.5
  • msal: "^1.3.0

Describe the bug

Using Azure B2C.

I’m using a custom policy - invitation sample located here:

When redirecting to the app from the invitation registration screen the following browser error message is displayed: AuthError: Unexpected error in authentication.: Hash does not contain state

Expected behavior To redirect to a SPA application using react-aad-msal

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser Chrome
  • Version 81

Configuration image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
stephenstroudcommented, May 18, 2020

@michalk93 Have you been using it through the react-aad package? Seems it’s referencing an older version https://github.com/syncweek-react-aad/react-aad/blob/5015337ef1eaa6d29822b207ddd2efeedc28caef/packages/react-aad-msal/package.json#L80

0reactions
michalk93commented, May 18, 2020

@stephenstroud you’ re right. I’m using react-aad package. That’s probably the problem. Thanks for this notice!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AuthError: Unexpected error in authentication.: Hash does not ...
now calling new UserAgentApplication(config) will error with the message: AuthError: Unexpected error in authentication.: Hash does not contain ...
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found