MSAL browser migration changes

This commit is contained in:
Sindhu Balasubramanian
2026-03-29 18:20:12 -07:00
parent 0b4c32a57d
commit b855094fb1
58 changed files with 9987 additions and 43 deletions

16
src/redirectBridge.ts Normal file
View File

@@ -0,0 +1,16 @@
/**
* MSAL COOP Redirect Bridge
*
* This page handles the authentication response from the Identity Provider (IdP)
* and broadcasts it to the main application frame. Required for msal-browser v5+
* to securely handle auth responses when the IdP sets Cross-Origin-Opener-Policy headers.
*
* Security Note: This file must be bundled with your application, NOT loaded from a CDN.
*
* CG Alert: MVS-2026-vmmw-f85q
*/
import { broadcastResponseToMainFrame } from "@azure/msal-browser/redirect-bridge";
broadcastResponseToMainFrame().catch((error: unknown) => {
console.error("MSAL redirect bridge error:", error);
});