locked
Blazor MSAL Auntentication library error “Unexpected error in authentication.: Hash does not contain state” RRS feed

  • Question

  • With the Blazor Wasm i have integrated Azure AD B2C successfully with Signin/Singout user flows. However, i am trying to integrate "Password Reset" user flow, and it is working partially. As soon we continue resetting the password, the control flows from AD to our application. During this , i am getting the below error from Msal. Unexpected error in authentication.: Hash does not contain state Please let me know if there any thoughts to fix this. Please note, i am using Blazor web assembly with .Net core 3.1
    • Moved by CoolDadTx Monday, August 17, 2020 2:03 PM ASP.NET related
    Monday, August 17, 2020 10:02 AM

All replies

  • Hi,

    I searched for the error message and found an interesting SO answer:

    "This issue occurs when you send the user directly to B2C without initialising MSAL in the app first. MSAL always passes a state parameter in its request to the auth endpoint and expects it returned back with the tokens, where it then confirms the state is the same as sent in the initial request."

    https://stackoverflow.com/questions/62615361/error-in-angular-msal-autherror-unexpected-error-in-authentication-hash-does

    I think the concept apply to the blazor specific MSAL library.

    hope it helps,

    Best regards.




    Monday, August 17, 2020 10:22 AM
  • Please post questions related to web development in the ASP.NET forums. This forum is for C#-specific questions only.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, August 17, 2020 2:03 PM