-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of old "msal." entires in local storage #527
Comments
We are using this library in an internal project (soon to be publicly released) and would appreciate if this issue is resolved. I'd be happy to help out, if needed. |
We are having this same issue, so we added a bit of cleanup code until this is fixed in the published MSAL package.
We're running this code everytime we renew the tokens. |
@dwatty This fix is in progress. |
@dwatty @freeman-g We have updated the dev branch with changes to fix this. We will be releasing another preview version of the library with these changes in npm by the end of the day. We will also be releasing the 1.0.0 version of the library soon as well, so please be on the lookout for that as well. If you see any other issues relating to msal cache cleanup in new versions of the code please reopen this issue. |
I'm still facing this issue with msal version 1.3.0 |
@Mathijs003 Please open a new issue, thanks! |
I'm submitting a...
Browser:
Library version
Library version: 0.2.3
Current behavior
If the user is never logged out and they continue to use the webapp long enough to have the iFrame renew the token, a new entry appears to be added to local storage and no entries are ever being cleaned up. In the event that the user stays logged in for several days, the local storage begins to really fill up with old entries.
My current localhost session has 171 entries for msal.acquireTokenUser and a new one is added every time acquireTokenSilent is called with an expired token and it makes a request for a new token. Of those 171, only 5 of them have actual values - the rest have blank values.
I also see entries for msal.token.renew.status and msal.authority piling up in my local storage as well.
I've run across issues which describe what I'm seeing, but based on the comments in those tickets this sounds like it would have already been resolved.
#327
#370
In reviewing the logout behavior, I noticed these entries aren't cleared from the local storage even when logout is called. The resetCacheItems function in here is only looking for two keys to clear, and it's not actually removing them in most cases, just emptying the value.
Expected behavior
The msal library should be cleaning up the local storage and only keeping around what it needs.
The text was updated successfully, but these errors were encountered: