Skip to content

fix: name the key a bare secret/publishable mode rejected - #155

Merged
mandarini merged 1 commit into
mainfrom
fix/name-misnamed-key-in-hint
Sep 11, 2026
Merged

mandarini merged 1 commit into
mainfrom
fix/name-misnamed-key-in-hint

Conversation

@mandarini

@mandarini mandarini commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

When a secret or publishable mode rejects an apikey that is a valid key of the same kind held under another name, the INVALID_API_KEY hint now names that key and points at the secret:<name> or secret:* mode that would accept it, and details.matchedKeyName carries the name. Bare modes match only the key named default, so a named key sent to bare secret used to report "matched no configured key", which sent callers hunting for a mismatch that did not exist. Key values never appear in the hint or details, and a key that matches nothing keeps the existing hint. The auth-modes docs also gain a note that the Vercel integration syncs the most recently created secret key, so functions called from Vercel-hosted code should use secret:* or a dedicated named key.

@mandarini
mandarini requested review from a team as code owners September 11, 2026 15:15
@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 8a0a5d1

@mandarini
mandarini merged commit bf1ca09 into main Sep 11, 2026
10 checks passed
@mandarini
mandarini deleted the fix/name-misnamed-key-in-hint branch September 11, 2026 16:11
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.

2 participants