-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
5.4.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
5.1.1
Public or Confidential Client?
Public
Description
The standard configuration used in the sample found here works as long as the app is rendered in a top level Window:
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v5.1.1/samples/msal-angular-samples/angular-standalone-sample
Aso soon as i render this app in my parent window as iframe the loginPopup no longer works.
The behavior is as follows:
- The login window opens in a popup
- I login with the credential
- The popup closes
- The authentication response never returns to my app → broken
It seems that the broadcastResponseToMainFrame(...) does not find the main application, when it is hosted in an iframe.
Btw. i tried with relative and absolute URI in the redirectUri config parameter.
Error Message
No response
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
- Sent
- Pending
MSAL Configuration
{
auth: {
clientId: config.openIdConfig.clientId,
authority: `https://login.microsoftonline.com/${config.openIdConfig.tenantId}`,
redirectUri: 'https://localhost:4203/redirect',
postLogoutRedirectUri: '/login',
},
cache: {
cacheLocation: BrowserCacheLocation.LocalStorage,
},
system: {
allowRedirectInIframe: true,
},
};Relevant Code Snippets
Sample: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v5.1.1/samples/msal-angular-samples/angular-standalone-sample
Embedded in iframeReproduction Steps
- Use loginPupup
- The login window opens in a popup
- I login with the credential
- The popup closes
- The authentication response never returns to my app → broken
Expected Behavior
The authentication result is returned to the main app
Identity Provider
Entra ID (formerly Azure AD) / MSA
Browsers Affected (Select all that apply)
Chrome
Regression
No response