-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Redirect Bridge login fails when initiated from page with a hash #8456
Copy link
Copy link
Closed
Labels
bug-unconfirmedA reported bug that needs to be investigated and confirmedA reported bug that needs to be investigated and confirmedmsal-browserRelated to msal-browser packageRelated to msal-browser packagemsal-reactRelated to @azure/msal-reactRelated to @azure/msal-reactpublic-clientIssues regarding PublicClientApplicationsIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.Customer is asking for a clarification, use case or information.
Metadata
Metadata
Assignees
Labels
bug-unconfirmedA reported bug that needs to be investigated and confirmedA reported bug that needs to be investigated and confirmedmsal-browserRelated to msal-browser packageRelated to msal-browser packagemsal-reactRelated to @azure/msal-reactRelated to @azure/msal-reactpublic-clientIssues regarding PublicClientApplicationsIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.Customer is asking for a clarification, use case or information.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
5.6.1
Wrapper Library
MSAL React (@azure/msal-react)
Wrapper Library Version
5.1.0
Public or Confidential Client?
Public
Description
When using a Redirect Bridge, and initiating a login with
InteractionType.Redirect, the login fails with the error code:authorization_code_missing_from_server_response.If I skip the redirect bridge, it works as expected.
From what I can see, when using the redirect bridge:
/redirect#code/#originalhash#codeXXX#codeXXXand ends up in/#originalhashAnd without redirect bridge:
/#codeXXX/#originalhashIt seems the redirect bridge doesn't strip away the hash from the initial url when redirecting back to the SPA, and just appends the
#codefrom entra, making the PublicClientApplication fail when trying to handle the code from the hash.Error Message
No response
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
https://github.com/h3rmanj/msal-hash-redirect-reproReproduction Steps
Expected Behavior
Should behave the same as when redirecting without a redirect bridge.
Identity Provider
Entra ID (formerly Azure AD) / MSA
Browsers Affected (Select all that apply)
Firefox, Safari, Edge
Regression
No response