-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial login failing with state mismatch error #1035
Comments
Any update for this? |
Hi @rvdhooft, this issue was something that we pushed a fix for in MSAL core, but has not been updated in angular. We are currently working on updating the angular wrapper to use the latest version of the core library, which should then fix this issue in the Angular wrapper. @jasonnutter will update when he has more info. |
Thanks for the update. Hoping that release comes soon! |
Is there any workaround for this issue that could be implemented meanwhile we wait for the updated wrapper? |
@pkanher617 is there a specific branch of the core lib that contains the fix for state mismatch? |
Fixes for this bug have been merged into |
Sorry, I will clarify that those fixes were merged for |
MSAL Angular has now been updated with the latest version of MSAL, upgrade guide available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev-angular-1.0-protectedresources/lib/msal-angular/docs/0.x-1.x-upgrade-guide.md Please let me know if this is still an issue after upgrading, thanks! |
Hey @jasonnutter! I got this exact error with:
(Took these from the Angular 9 example directory, although I am running Angular 8) |
We are experiencing this issue with a select few users. "@azure/msal-angular": "0.1.4", Microsoft Edge Any idea's what the cause might be? |
@jarodsmk Can you please try
@ryandegruyter Can you clarify what you mean by that? Not persisting in local storage? And which version of Edge? And are they using InPrivate by chance? |
@jasonnutter Sure thing 👌 Will bump it and see what happens in the upcoming days! How I've been handling it for now is catching the exception and forcing the user to login again, resulting in a double login at times but atleast didn't leave them hanging |
Update package to msal@1.3.0-beta.1 fixed the issue, thanks. |
@jasonnutter we updated to 1.0.0beta4, seems to resolve the issue. |
Great, thanks for the updates! |
Seems to be good for me too, I upgraded to I noticed that when bumping to the newer Thanks @jasonnutter ! |
After upgrading my React app to Firefox Private tab,
Decoded:
I've also tried UPD: I've tried to replicate my issue with |
Here you go, you can easily reproduce this bug by changing two lines in the
|
@Lomand I was only able to reproduce that behavior in Firefox Private Browsing. I believe this may be because Firefox will clear local storage in this scenario. Setting |
I am having the same error in firefox, new edge, I already set "msal": "^1.2.2" |
@zhaozhongming Please try |
@jasonnutter we've got this issue with msal@1.3.0. Strangely enough, only when the app is deployed. Works with localhost though. |
Sorry, bad timing... The CI picked up 1.2.2 and locally it was already 1.3.0. It's fixed in 1.3.0 for us. |
@MaximBalaganskiy Great, thanks for the update! |
We expect |
I'm experiencing this exact issue with the 2.0.0-beta.2 version of @azure/msal-browser. Any solutions to this? |
@thj-dk Please open a new issue, thanks! |
I'm submitting a...
Browser:
Library version
Current behavior
On the initial load, a user is redirected to the login page, and after a successful login they are redirected back to the app, which throws a
Error State Mismatch.Expected State: null,Actual State: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
error, and then are redirected back to the login page. After logging in again, the app works as expected.The MSAL module is initialized in an AuthModule with the following config:
The signInAuthority here is an Azure B2C Sign in v2 user flow.
I'm using the provided MsalInterceptor and MsalGuard, and I have the MsalGuard on each route in the app. All other auth handling is in an Auth Service file:
Any help would be appreciated!
Expected behavior
Login credentials should only have to be entered once.
Minimal reproduction of the problem with instructions
The text was updated successfully, but these errors were encountered: