Closed fhljys closed 3 years ago
Invalid Issue Template: Please update the original issue and make sure to fill out the entire issue template so we can better assist you.
@fhljys Can you please share steps to reproduce and verbose level logs from msal? It's unclear from the stackoverflow issue linked, is this an issue with your own custom query string or the hash that contains the tokens returned from AAD? Can you clarify?
Hi @tnorling , thanks for your prompt reply.
Here is to provide more details
From 3->4, my path and query string are lost.. I shared you a gif in teams as well.
@tnorling , after more investigation, I think we found the root cause. Issue happens here: The original code removed hash, but an extra # is left. Angular will treat this as a location change, so it will cancel the original navigation and trigger a new one. The cancel operation somehow triggered an extra pop state.
So the issue here is why MSAL provides me an extra # after the navigation? Could you fix that? (I tested with my code, (referencing this https://stackoverflow.com/questions/1397329/how-to-remove-the-hash-from-window-location-url-with-javascript-without-page-r/5298684#5298684) code on the right side can get rid of this issue. )
@fhljys Please update to the latest version of msal
, as this issue (extra #
remaining in url) was addressed in 1.4.2: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-core/changelog.md#142
Thanks @jasonnutter. Verified. It works.
Library
msal@1.4.0
or@azure/msal@1.x.x
@azure/msal-browser@2.x.x
@azure/msal-node@1.x.x
@azure/msal-react@1.x.x
@azure/msal-angular@0.x.x
@azure/msal-angular@1.x.x
@azure/msal-angular@2.x.x
@azure/msal-angularjs@1.x.x
Framework
Description
In Angular APP, hit exactly the same issue as described here. The query string appeared for a while and then got lost. https://stackoverflow.com/questions/63707766/capturing-query-string-before-angular-constructor-is-called
We are using 1.4.0, tried 1.4.8, same issue
Error Message
MSAL Configuration
{ auth: { clientId: clientId, authority: AAD_ENDPOINT + (this._tenantId || 'organizations'), validateAuthority: true, redirectUri: window.location.origin, postLogoutRedirectUri: window.location.origin + baseHref, navigateToLoginRequestUrl: true }, cache: { cacheLocation: window.navigator.userAgent.indexOf('Edge') > -1 ? 'localStorage' : 'sessionStorage' }, system: { loadFrameTimeout: 30 * 1000 }, framework: { isAngular: true } }
Reproduction steps
Expected behavior
Identity Provider
Browsers/Environment
Regression
Security
Source