Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

MsalCacheHelper.Clear() method - change behavior instead of deprecation #121

Closed
rabenshm opened this issue Jan 26, 2021 · 2 comments · Fixed by #130
Closed

MsalCacheHelper.Clear() method - change behavior instead of deprecation #121

rabenshm opened this issue Jan 26, 2021 · 2 comments · Fixed by #130
Labels
bug Something isn't working P2

Comments

@rabenshm
Copy link

Following offline talk with Bogdan, we agreed that it is better instead of deprecating the MsalCacheHelper.Clear() method, to change its behavior that it will only clear the cache entries relevant to the specific public client application id that the MsalCacheHelper object was created with, and not whole entries in the cache file itself.

@bgavrilMS
Copy link
Member

Problem is that MsalCacheHelper is constructed with a client_id however Clear() method simply removes the data file, i.e. clears the cache for all client_id.

@bgavrilMS bgavrilMS added bug Something isn't working P2 labels Jan 26, 2021
@bgavrilMS bgavrilMS linked a pull request Feb 11, 2021 that will close this issue
@bgavrilMS
Copy link
Member

I will have removed the need to pass in the client_id to the cache with the associated PR. So with next release - 2.18.0 - you can have a single instance of MsalCacheHelper.

To sign out users, you need to use MSAL i.e. call RemoveAccountAsync. Wiping out the token cache file is discouraged, we will only keep the method for backwards compatibility reasons.

Ping me to discuss further.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants