-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Updating to msal-browser 4.9.0 login doesn't work anymore #7663
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
Comments
I had to roll back to:
4.9.0 redirect caching changes caused wiped out accounts on browser refresh. Doesn't happen with 4.8.0. |
I am also unable to login after upgrading to 4.9.0. Same issue of handleRedirectPromise response being null. I am using just |
@azure/msal-browser v4.9.1 was released yesterday. I tried that version, but it seems to have the same issue. |
I'm having the same problem, tried out v4.9.1 and the problem remained. Rolled back to @azure/msal-browser v4.8.0 and @azure/msal-angular v4.0.7 and logins worked as expected with redirect flow. With the new versions the InteractionStatus appears to get stuck in "startup" state. |
I'm having a slightly different issue, but potentially related. After logging out and redirecting, I get stuck in the |
We had to rollback to @azure/msal-browser v4.8.0. We are also using the redirect flow. |
I'm also having the issue for my react app where redirecting results in a loop, neither v4.9.0 and v4.8.0 work, I have to revert back to v4.7.0 |
I'm also having the same issue with msal-react and msal-browser 4.9.1, I had to revert back to 4.8.0 |
aaaaaand... they silently killed 4.9.x - no word in this issue :D LOL! |
We are working on reproducing on our end, we are not seeing it in our samples. If someone can share steps to repro this for msal-browser (msal-angular is shared in the issue desc), including msal configuration, is the migration done with reloading the page and the APIs used, it will be helpful to sort this early. The deprecation announcement is made in response to the issues reported here to ensure other folks are not impacted. |
Hey @StantonCoffey89 I am able to reproduce an issue with the interaction status not clearing out properly after user logs out (logoutRedirect) and then logs back in using the acquireTokenRedirect for msal-browser. Is this the same scenario you are facing or anyone else here is? If you can provide a full MSAL trace logs from the console, that would be helpful in confirming this use case. |
I have a pretty simple use case. I hope this can help with debugging. On location change, if the there is an account, the content renders, otherwise the login function of my AuthProvider is called. This worked very well in 4.8, and as mentioned, e.g.
file: "~/lib/auth/msal-client";
file: "~/components/ux/authentication/Authentication/AuthenticationProvider"
file: "~/components/ux/authentication/AuthenticationContext"
file: "~/components/ux/authentication/CompleteAuthentication" This is the page for the route that matches the authentication redirect URI. It calls the handler to complete authentication in the auth provider.
|
Here are 2 trace outputs. One where I'm able to login successfully, the other where login fails. Both scenarios start with a browser with no users logged in. The failure scenario (v4.9.1) gets stuck after the MsalService initialization steps end. If you look at my "loginAzureAd()" function above you'll see that I'm waiting for the "inProgress$" status to change to "None" for me to call the "loginRedirect()" function. But the status never changes. The success scenario (v4.8.0) is successful because the MsalService initialization steps end AND the "inProgress$" status changes to a value of "None" meaning I can now call the "loginRedirect()" function. successful-login-sequence-v4.0.7-v4.8.0-1743603538226.log |
Hi all, Is there any update or workaround available at this point? We'd really appreciate any insights or guidance. Thanks in advance! |
Can folks try out the latest builds from today and let us know if this issue is fixed? Thank you! |
Hello, |
I've updated this morning and can confirm my Angular app is working as expected again, thank you! |
|
I've updated to 4.10.0 and all is working now. Thanks! |
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
4.9.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
4.0.7
Public or Confidential Client?
Public
Description
(please go easy on me, this is my first time submitting a bug report)
Before updating my NPM packages I was able to have my angular application log a user in. After updating, the login processing doesn't work anymore. If I revert my msal-angular and msal-browser packages back to 4.0.7 and 4.8.0, respectively, then the application logs in fine.
Error Message
No response
MSAL Logs
After updating my npm packages, the login process after a redirect seems to get stuck after the "initializeEnd". It doesn't seem to handle the redirect portion and finish logging the user in.
MsalBroadcastService inProgress$ startup
MsalBroadcastService msalSubject$ msal:initializeStart {eventType: 'msal:initializeStart', interactionType: null, payload: null, error: null, timestamp: 1743002095450}
[Wed, 26 Mar 2025 15:14:55 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
[Wed, 26 Mar 2025 15:14:55 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
Angular is running in development mode.
[Wed, 26 Mar 2025 15:14:55 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
MsalBroadcastService msalSubject$ msal:initializeEnd {eventType: 'msal:initializeEnd', interactionType: null, payload: null, error: null, timestamp: 1743002095482}
[Wed, 26 Mar 2025 15:14:55 GMT] : [] : @azure/[email protected] : Info - handleRedirectPromise called but there is no interaction in progress, returning null.
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
The following log outputs are what login normally looks like after a redirect back to my page. You can see all the steps happen and the MsalBroadcastService.inProgress$ gets to a state of "none", which I'm expecting.
MsalBroadcastService inProgress$ startup
MsalBroadcastService msalSubject$ msal:initializeStart {eventType: 'msal:initializeStart', interactionType: null, payload: null, error: null, timestamp: 1742999991666}
[Wed, 26 Mar 2025 14:39:51 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
[Wed, 26 Mar 2025 14:39:51 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
Angular is running in development mode.
[Wed, 26 Mar 2025 14:39:51 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
MsalBroadcastService msalSubject$ msal:initializeEnd {eventType: 'msal:initializeEnd', interactionType: null, payload: null, error: null, timestamp: 1742999991692}
[Wed, 26 Mar 2025 14:39:51 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
MsalBroadcastService msalSubject$ msal:handleRedirectStart {eventType: 'msal:handleRedirectStart', interactionType: 'redirect', payload: null, error: null, timestamp: 1742999991694}
MsalBroadcastService inProgress$ handleRedirect
[Wed, 26 Mar 2025 14:39:51 GMT] : [0195d2e5-358e-7f58-9785-bc2f05dd8d23] : [email protected] : Info - handleRedirectPromise called but there is no interaction in progress, returning null.
MsalBroadcastService msalSubject$ msal:handleRedirectEnd {eventType: 'msal:handleRedirectEnd', interactionType: 'redirect', payload: null, error: null, timestamp: 1742999991695}
MsalBroadcastService inProgress$ none
[Wed, 26 Mar 2025 14:39:51 GMT] : [] : @azure/[email protected] : Info - CacheManager:getIdToken - Returning ID token
already an active account
Identity Provider
Entra ID (formerly Azure AD) / MSA
Browsers Affected (Select all that apply)
Chrome
Regression
@azure/msal-angular 4.0.7
The text was updated successfully, but these errors were encountered: