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

Angularjs - APP reloads when user visits the already visited url after token expiration #868

Closed ckalgos closed 4 years ago

ckalgos commented 5 years ago

When user visits the already visited urlafter token expiration , the expiration time for my resource becomes 0 and renew token is not called as the template is served from $templateCache.

Now if user visits a new url(url which user has not visited in the session) , since expiration time is 0 it redirects user to login page , causing the app to reload and lose entered data.

Removing this line if ($templateCache.get(config.url)) return config in adal-angular has fixed my issue, i just wanted to confirm whether there will be any downside of removing this or is there any recommended way to fix the issue i am facing?

jmckennon commented 4 years ago

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.

As long as everything else on your app works fine with your workaround, it's fine. All that line does is look in the cache, so you won't be receiving the benefits of the cache in that case, but it does fix this bug.