-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix redirect clearing popup hash (#6652)
The handleRedirectPromise logic contains a bug which can result in popup windows not closing. This PR fixes that bug. Today handleRedirectPromise does the following things: 1. Parses the hash and looks for known properties 2. Clears the hash from the window 3. Parses state to determine if the response belongs to a Redirect 4. Returns null if not Because we clear the hash before we've determined if the response is even a redirect response this can result in race conditions preventing popup windows from closing if the popup uses a redirectUri which invokes handleRedirectPromise (most apps using React or Angular do this out of the box) This PR addresses this bug by parsing state for the interactionType _before_ clearing the hash.
- Loading branch information
Showing
9 changed files
with
137 additions
and
164 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@azure-msal-browser-db1a2b10-8002-4f2a-9b54-81d7632afa03.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Fix race condition which may cause popups not to close #6652", | ||
"packageName": "@azure/msal-browser", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.