docs: clarify PKCE vs client authentication and refresh tokens#448
Open
dhensby wants to merge 1 commit into
Open
docs: clarify PKCE vs client authentication and refresh tokens#448dhensby wants to merge 1 commit into
dhensby wants to merge 1 commit into
Conversation
Closed
Documents the conclusions from the PKCE/refresh standards review so the recurring confusion doesn't return: - guide/pkce.md: new section explaining that code_verifier applies only to the authorization_code exchange (never refresh), that PKCE is not a substitute for client_secret, and how to allow public clients to refresh without a secret. - Model#getClient JSDoc: clientSecret is absent for public clients and for PKCE authorization_code requests even when the client has a secret, so the model must reject a confidential client that omits it. - requireClientAuthentication (server.js JSDoc + index.d.ts): disabling a grant turns off the client_secret presence check for the whole grant (all clients), so per-client enforcement belongs in getClient. Regenerated docs/api/model.md and docs/api/server.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54df885 to
3ec9d35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Documentation-only clarifications from the PKCE / refresh standards review (#288), making the behaviour explicit so the same confusion doesn't recur.
Changes
docs/guide/pkce.md— new "PKCE, client authentication and refresh tokens" section:code_verifierapplies only to theauthorization_codeexchange (not refresh); PKCE is not a substitute forclient_secret; and how to let public clients refresh without a secret (with the caveat that it relaxes the presence check for the whole grant).Model#getClientJSDoc —clientSecretis absent for public clients and for PKCEauthorization_coderequests even when the client has a secret, so the model must reject a confidential client that omits it.requireClientAuthenticationJSDoc (server.js+index.d.ts) — setting a grant tofalsedisables theclient_secretpresence check for the whole grant (all clients), so per-client (public vs confidential) enforcement belongs ingetClient.docs/api/model.mdanddocs/api/server.md.Context
Follows the standards review on #288 (closed as works-per-spec). The deeper per-client public/confidential distinction remains tracked in #81; this PR just documents the current, correct behaviour and the model's responsibilities. Docs only — no code/behaviour change;
npm run lintpasses.🤖 Generated with Claude Code