Skip to content

fix: warn when auth.storage is ignored by createBrowserClient/createServerClient - #284

Open
mandarini wants to merge 1 commit into
mainfrom
fix/warn-ignored-storage-option
Open

fix: warn when auth.storage is ignored by createBrowserClient/createServerClient#284
mandarini wants to merge 1 commit into
mainfrom
fix/warn-ignored-storage-option

Conversation

@mandarini

@mandarini mandarini commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

createBrowserClient and createServerClient always store the session via cookies, so any auth.storage you pass in is silently overwritten and has no effect. This adds a console warning when that option is passed, plus a short doc note (in both functions' tsdoc and the README) clarifying that auth.storage is ignored, while auth.userStorage remains respected when cookies.encode is "tokens-only". No behavior change: the cookie-backed storage still always wins, this only makes the existing no-op visible instead of silent.

Fixes #142

@mandarini
mandarini marked this pull request as ready for review August 14, 2026 16:52
@mandarini
mandarini requested review from a team as code owners August 14, 2026 16:52
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.

Storage: window.localstorage in createBrowserClient doesn't work

2 participants