Skip to content

docs: state that withClaims is not an auth gate - #125

Merged
mandarini merged 1 commit into
mainfrom
docs/withclaims-not-a-gate
Aug 25, 2026
Merged

docs: state that withClaims is not an auth gate#125
mandarini merged 1 commit into
mainfrom
docs/withclaims-not-a-gate

Conversation

@mandarini

@mandarinimandarini commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

withClaims never rejects a request that has no token, so [withClaims(), withSupabaseClient()] reads like the composable form of withSupabase({ auth: 'user' }) but accepts anonymous callers, and the mistake is silent: it compiles and passes a logged-in smoke test. This PR makes the docs say so before first publish: an explicit callout in the withClaims docstring, a note in the standalone pipeline section of docs/postgres.md, and a new middleware/claims section in the API reference, each pointing at withSupabase({ auth: 'user' }) as the actual gate. The wrapped-entry snippet is the form verified to typecheck under this repo's strict config; the bare wrapper from SDK-1596 conflicts with typed entries placed after it in a pipeline. Docs only, no behavior change; best merged after #124 so the gate recommendation never sits ahead of the lazy admin client fix.

@pkg-pr-new

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@supabase/server@125

commit: 4fd2f8a

@mandarini
mandarini marked this pull request as ready for review August 25, 2026 12:49
@mandarini
mandarini requested review from a team as code ownersAugust 25, 2026 12:49
@mandarinimandarini self-assigned this Aug 25, 2026
@mandarini
mandarini merged commit 9968258 into mainAug 25, 2026
9 checks passed
@mandarini
mandarini deleted the docs/withclaims-not-a-gate branch August 25, 2026 12:59
Sign up for freeto 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.

2 participants

@mandarini@spydon