Skip to content

docs: clarify that bare secret/publishable auth matches only the 'default' key - #109

Merged
tomaspozo merged 2 commits into
mainfrom
docs/clarify-default-key-auth
Jul 27, 2026
Merged

docs: clarify that bare secret/publishable auth matches only the 'default' key#109
tomaspozo merged 2 commits into
mainfrom
docs/clarify-default-key-auth

Conversation

@claude

@claude claude Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Requested by Katerina Skroumpelou, Kalleby Santos, Tomás Pozo · Slack thread

Before / After

Users keep getting tripped up by how bare auth: 'secret' / auth: 'publishable' resolves keys.

Before:

  • The default-key behaviour in docs/auth-modes.md was stated as a skimmable, footnote-style line under each mode ("By default, secret mode validates against the "default" key…"), easy to miss.
  • The README.md publishable-key example comment said the request is validated "against a publishable key", implying any key would match.

After:

  • Each mode section (Publishable, Secret) now carries a prominent blockquote callout spelling out that bare secret / publishable matches only the key named default in the key set, with no fallback to named keys — so if every key in the set is named, bare secret / publishable never matches. Each callout points to secret:<name> / publishable:<name> for a named key and secret:* / publishable:* to accept any key, keeping the existing cross-reference to the "Named key syntax" section.
  • The README.md example comment now names the 'default' publishable key explicitly.

How

  • docs/auth-modes.md: promoted the two default-key footnote lines to bold-led blockquote callouts (matching the file's existing blockquote house style — the docs do not use > [!IMPORTANT]-type admonitions).
  • README.md: fixed the publishable-key example comment to name the 'default' key.

The source-of-truth logic is unchanged: keyName ?? 'default' in src/core/verify-credentials.ts (bare mode resolves to the literal key named default; there is no fallback to named keys).

Docs-only — no code behaviour change.


Generated by Claude Code

…ault' key

Promote the skimmable default-key footnotes in docs/auth-modes.md to
prominent callouts that state explicitly that bare auth: 'secret' /
'publishable' matches ONLY the key named 'default' in the key set, with
no fallback to named keys. Also name the 'default' key in the README
publishable-key example comment.

Docs-only; no code behaviour change. Source-of-truth logic remains
keyName ?? 'default' in src/core/verify-credentials.ts.
@pkg-pr-new

pkg-pr-new Bot commented Jul 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 2115731

@claude
claude Bot marked this pull request as ready for review July 27, 2026 16:30
@claude
claude Bot requested review from a team as code owners July 27, 2026 16:30
@tomaspozo
tomaspozo merged commit 5b0f3d6 into main Jul 27, 2026
8 checks passed
@tomaspozo
tomaspozo deleted the docs/clarify-default-key-auth branch July 27, 2026 16:32
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.

4 participants