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

[SDK-3541] Rework ignoreCache to cacheMode and introduce 'cache-only'. #950

Merged
merged 4 commits into from
Aug 16, 2022

Conversation

frederikprijck
Copy link
Member

Changes

This PR reworks ignoreCache to use cacheMode instead, allowing for three caching modes.

  • on (default): read from the cache caching, but fall back to Auth0 as needed
  • off: don’t read from the cache
  • cache-only: read from the cache, don’t fall back to Auth0

With the new cache-only option, we provide the user with the ability to try and retrieve a token from the cache, but not call Auth0 when there isn't any token to return, or the token is expired.

Users that used to use ignoreCache: true, should now use cacheMode: 'off' instead.

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

@frederikprijck frederikprijck requested a review from a team as a code owner August 15, 2022 05:55
@frederikprijck frederikprijck changed the base branch from master to v2 August 15, 2022 05:55
src/global.ts Outdated Show resolved Hide resolved
src/global.ts Outdated Show resolved Hide resolved
src/global.ts Outdated Show resolved Hide resolved
@frederikprijck frederikprijck merged commit 6b4ec50 into v2 Aug 16, 2022
@frederikprijck frederikprijck deleted the feat/sdk-3541 branch August 16, 2022 09:05
@frederikprijck frederikprijck mentioned this pull request Oct 25, 2022
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.

2 participants