AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 374 forks source link

ADAL creates nested IFRAMEs when acquireToken is called #765

Closed TheAifam5 closed 4 years ago

TheAifam5 commented 6 years ago

For me, happens when the ADAL configuration contains endpoints. ADAL creates an IFRAME which redirects then to the application, then application creates again IFRAME and so on 🗡 More information here: https://github.com/grumar/adal-angular5/issues/43

ADAL Config:

{
  clientId: 'XXXXXXXXXXXXXXXXXXXX',
  postLogoutRedirectUri: location.origin,
  redirectUri: location.origin,
  instance: 'https://adfs.XXXXXXXXXXXX.XX/',
  tenant: 'adfs',
  cacheLocation: 'localStorage',

  // Map the location of a request to an API to a the identifier of the associated resource
  // "Enter the root location of your API app here, e.g. https://contosotogo.azurewebsites.net/":
  // "Enter the App ID URI of your API app here, e.g. https://contoso.onmicrosoft.com/TestAPI",
  endpoints: {
    'https://XXXXXXXXXXX.azurewebsites.net/': 'http://xxx/XXXXXXXXXXXXX'
  },
}
TheAifam5 commented 6 years ago

Looks like downgrading to version 1.0.15 fixes that problem, based on this pull request to the repository: https://github.com/benbaran/adal-angular4/pull/59/files

husseinkorly commented 6 years ago

I can see it happening in both versions ! I'm not using any wrapper package.

sameerag commented 4 years ago

This is fixed in msal js. Please try it and let us know. All current authentication work from microsoft is delivered through msal js library here. adal js is still supported only for security fixes. We would recommend to move to msal js for any advanced feature asks.