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 372 forks source link

How to sign-in automatically on other tabs? #767

Closed joseph-d-p closed 6 years ago

joseph-d-p commented 6 years ago

I'm using Angular 2.

Inside my auth guard has the line:

context.handleWindowCallback();

However, on other tabs, even though a user is authenticated in one tab, it redirects to sign-in page and has all adal.* session storage fields empty.

I tried using the Session Storage but was unsuccessful.

The Session Storage had the updated values after the attempted sign-in with id_token:

adal.error: "Invalid_state"
adal.error.description: "Invalid_state. state: xxxxx-xxxx-xxxx-xxxx-xxx"
adal.token.renew.status: "Completed"

How can I manage the session efficiently on multiple tabs using ADAL.js?

joseph-d-p commented 6 years ago

After setting the cacheStorage to localStorage it's now working!