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

fix: [AUTH-2047] disable fetch cache for all requests #271

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

max-stytch
Copy link
Contributor

This PR passes cache: "no-store" into all requests made by the SDK in order to disable the NextJS v13+ Fetch Cache. We almost never want to cache responses from this client.

Customers that do want to opt in to fetch cache behavior can use the workaround described in #262 (comment) to set a custom cache setting on the private fetchConfig, which will override the value set in this PR.

I'll open up another feature request issue for tracking adding support for custom fetch options - either per client or per request.

Closes #262

@max-stytch max-stytch requested a review from a team as a code owner October 18, 2023 16:51
@max-stytch max-stytch temporarily deployed to integration_tests October 18, 2023 16:51 — with GitHub Actions Inactive
@max-stytch max-stytch temporarily deployed to integration_tests October 18, 2023 16:51 — with GitHub Actions Inactive
@@ -1,6 +1,6 @@
{
"name": "stytch",
"version": "9.0.4",
"version": "9.0.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reasoning through: I agree this is a PATCH bump since it fixes errant behavior and fixes a bug for people using Stytch in conjunction with a common framework. I was wondering at first if this should be a MINOR bump, but PATCH seems appropriate.

@max-stytch max-stytch merged commit 62bc57a into main Oct 18, 2023
@max-stytch max-stytch deleted the max-auth-2047 branch October 18, 2023 18:27
@stytchauth stytchauth deleted a comment from linear bot Oct 18, 2023
max-stytch added a commit that referenced this pull request Oct 20, 2023
* fix: [AUTH-2047] disable fetch cache for all requests

* 9.0.5
max-stytch added a commit that referenced this pull request Oct 20, 2023
* fix: [AUTH-2047] disable fetch cache for all requests

* 9.0.5

Co-authored-by: Max Gerber <89937743+max-stytch@users.noreply.github.com>
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.

Need custom fetch options for native fetch
3 participants