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

clearCache doesn't clear cached user #807

Closed sliekens closed 5 years ago

sliekens commented 6 years ago

Expected behavior Calls to getCachedUser() should return null after doing clearCache().

Actual behavior clearCache() does not clear the _user field. getCachedUser() continues to return claims information from the deleted id_token.

Other information This seems to be by design because logOut() first does clearCache() and then resets _user to null. https://github.com/AzureAD/azure-activedirectory-library-for-js/blob/e9d23e719eccf2341ee38b11323101fb14cb9610/lib/adal.js#L852-L858

Unfortunately I can't use logOut() because I want to handle navigation myself.

Anyhow, clearCache should probably clear everything including the cached user.

rohitnarula7176 commented 5 years ago

Closing this issue. Fixed in dev and will be part of our next release.

sliekens commented 5 years ago

Nice, thanks.

Mikrovolnovka commented 3 years ago

@rohitnarula7176 When is next release supposed to be? This issue is closed in Oct 17, 2018 and the latest release was on Feb 27, 2018. (1.0.17)