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

acquireToken does not work if the config.redirectUri different from login page (different ports or domains) #844

Closed DmitryZevalev closed 4 years ago

DmitryZevalev 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
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Browser:

Library Name

Library version

Library version: 1.0.17

Current behavior

Expected behavior

jmckennon commented 4 years ago

This is actually possible today, but there are some caveats/risks associated with this, so we generally do not recommend redirecting to another domain. You can set your redirectURI in the Azure portal and in adal js to be something like app.domain.com, but make the original login request from domain.com. The risk here is that all responses, errors, etc. will now all be sent to app.domain.com and not domain.com.

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.