-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Remove staleTime
option from client
#2613
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/8V87gvhVeNGyDRw5jtxtTUXYbMQF |
staleTime
option from client staleTime
option from client ☕️
staleTime
option from client ☕️staleTime
option from client
Codecov Report
@@ Coverage Diff @@
## next #2613 +/- ##
=======================================
Coverage 13.96% 13.96%
=======================================
Files 85 85
Lines 1325 1325
Branches 379 378 -1
=======================================
Hits 185 185
Misses 951 951
Partials 189 189
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this will have to be added to the docs, but also to the migration guide!
https://github.com/nextauthjs/docs/blob/main/docs/getting-started/upgrade-to-v4.md#3-sessionprovider
BREAKING CHANGE: `staleTime` (previously `clientMaxAge`) has been removed. Check out `refetchInterval` instead. It should cover most of the cases. If not, we can look into adding this back later on.
Reasoning 💡
We reasoned that
staleTime
, a new option for<SessionProvider />
was unnecessary as another new option,refetchInterval
, already covers this behaviour implicitly. Hence removing it from the client module 🗑.Checklist 🧢
DocumentationTestsAffected issues 🎟
None.