mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-20 20:26:55 -05:00
docs(next-js): fix dangling postmortem ref and deep-link defer-refresh docs
This commit is contained in:
@@ -123,7 +123,7 @@ const signIn = async () => {
|
||||
```
|
||||
|
||||
<Callout type="info">
|
||||
`nextCookies()` auto-enables [`deferSessionRefresh`](/docs/concepts/session-management), so `GET` session reads stay write-free and RSC navigation never drifts the database session ahead of the cookie. The client re-issues the refresh as a writable `POST`.
|
||||
`nextCookies()` auto-enables [`deferSessionRefresh`](/docs/concepts/session-management#defer-session-refresh), so `GET` session reads stay write-free and RSC navigation never drifts the database session ahead of the cookie. The client re-issues the refresh as a writable `POST`.
|
||||
|
||||
Reading the session only on the server (no `createAuthClient`)? Set `session: { deferSessionRefresh: false }` to keep refreshing on `GET`.
|
||||
</Callout>
|
||||
|
||||
@@ -34,7 +34,7 @@ export const nextCookies = () => {
|
||||
// refresh would only drift the DB ahead of the stale cookie. The client
|
||||
// re-issues the refresh as a POST, where cookies are writable. The RSC
|
||||
// context cannot be detected from request headers.
|
||||
// @see .postmortem/rsc-header-detection.md
|
||||
// @see https://github.com/better-auth/better-auth/issues/9776
|
||||
init() {
|
||||
// `defu` preserves an explicit user value, so this applies only when
|
||||
// `deferSessionRefresh` is unset. Escape hatch: set it to `false`.
|
||||
|
||||
Reference in New Issue
Block a user