Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/content/4.integrations/1.nuxthub.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ export default defineNuxtConfig({

Sessions are cached in NuxtHub KV, reducing database queries.

## Choosing Secondary Storage

`secondaryStorage` stores session lookups in NuxtHub KV and can reduce repeated database reads on session validation. SSR requests still resolve session state per request, but lookups can hit KV instead of the database.

This setup can introduce a short propagation window after session invalidation events, such as sign-out or permission-sensitive updates. For critical authorization paths, keep server-side checks in place with `requireUserSession`.

Enable `secondaryStorage` when `hub.kv` is enabled and session-read traffic is a measurable bottleneck. Keep DB-only sessions when your traffic is moderate or when you prioritize stricter read-after-write consistency.

To return to DB-only session reads, set `auth.secondaryStorage` to `false` and deploy.

## Production Migrations

NuxtHub handles migrations automatically in most deployments. For manual control:
Expand Down
Loading