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

Renew token uses iFrame when `popup` is set to `true` #843

Closed maordadush closed 4 years ago

maordadush commented 5 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Browser:

Library Name

Library version

Library version: 1.0.17

Current behavior

When setting popup=true, acquiring token works with popup but renewToken tries to use iFrame

Expected behavior

When setting popup=true both acquireToken and renewToken should show a popup

Minimal reproduction of the problem with instructions

Set popup to true, and try to make an authenticated request after cookie (& cache) is expired

jmckennon commented 4 years ago

This functionality is intended, as renewToken is meant to specifically use an iFrame all the time. If you want to popup again, you can use acquireToken with popup=true as you mention, or acquireTokenPopup. These are functionally the same as renewing a token, as you'll just be obtaining a new one instead.

Additionally, all current authentication work from Microsoft is delivered through the msal js library here. adal js is still supported only for security fixes. We recommend moving to msal js for any advanced feature requests and bugfixes.