-
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
Fix MSAL Angular MsalInterceptor bug matching to query string #7137
Conversation
@@ -906,9 +908,9 @@ describe("MsalInterceptor", () => { | |||
sampleAccountInfo, | |||
]); | |||
|
|||
httpClient.get("http://site.com/relative/me").subscribe(); | |||
httpClient.get("http://localhost:9876/relative/me").subscribe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This unit test needed to be fixed as it was providing a correct match where the host name and port were different in the case of a protected resource that was a relative URL.
My interceptor was no longer being invoked, or is no longer matching/inserting the bearer token after this update v3.0.19. Had to roll back. Is there new guidance on how to configure? My protectedResource definitions specify relative paths (i.e. '/api/v1/User'). Thanks! |
@gcrockenberg Relative paths should still work with the new update. Please open a new issue here with your configuration, paths, and protected resources for our investigation. Thank you. |
I've also had the same issue, I had to put in the full API address to MSAL_INTERCEPTOR_CONFIG for it to work again. |
@jano-kucera Again, please open a new issue here with your configuration, paths, and protected resources for our investigation. Thank you. |
This PR addresses a bug where the
MsalInterceptor
could match the protectedResource to the query string part of the URL instead of the host name and port part of the URL. It also refactors the code surrounding relative URLs.This addresses issue #7111