Skip to content
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

Ensure to only clear current client cache when logging out #1068

Merged
merged 2 commits into from
Jan 17, 2023

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Jan 16, 2023

Changes

When calling logout, we would call cacheManager.clear() without specifying any client id, resulting in clearing all data from the cache, including those belonging to other clientId's as the one configured in the current Auth0Client instance.

When using local storage, this results in logging out both app1.domain.com and app2.domain.com (both using a different clientId), when that might not be intended.

Unless the user sets clientId to null, we should only clear the data from the cache that belongs to either the provided clientId, or the globally configured clientId.

References

Fixes #1063

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logout is clearing credentials stored in local storage for ALL client_ids
3 participants