Skip to content

Add PKCE documentation - #256

Draft
ricardobcl wants to merge 3 commits into
support/update-authentication-documentationfrom
feature/add-pkce-documentation
Draft

Add PKCE documentation#256
ricardobcl wants to merge 3 commits into
support/update-authentication-documentationfrom
feature/add-pkce-documentation

Conversation

@ricardobcl

Copy link
Copy Markdown

Description

Documents the Native Application Flow (PKCE) being added to the authorization server by uphold/backend#19003, for native clients (desktop, CLI, mobile) that receive the OAuth redirect on a loopback address — including the MCP client use case.

  • New _authentication.md section: proof key generation (code_verifier/code_challenge, S256 only), the GET /oauth2/authorize/start endpoint with its parameters and challenge semantics (30-minute validity, bound to client_id + state, fresh state per attempt), the code_verifier token-exchange parameter with its failure mode (mismatch consumes the code), and loopback redirect URL matching (port-agnostic per RFC 8252 §7.3).
  • _applications.md: loopback http redirect URLs are now registrable for native applications, with a pointer to the PKCE requirement they trigger.
  • _ratelimits.md: GET /oauth2/authorize/start — 30 requests / 5-min window per IP.
  • Intro updated to present the three authorization flows.

Stacked on #250 (the auth-section refresh), since both edit the same sections — this PR targets that branch and will retarget to master automatically when it merges.

Blocked — do not merge until uphold/backend#19003 is merged and deployed

Two open review items on the backend PR may require small wording updates here before merging:

  • Whether /oauth2/authorize/start will reject clients that are not PKCE-required (review suggestion) — affects the "other applications may opt in" phrasing.
  • Whether client authentication (client_secret) at the token endpoint will be relaxed for public clients — the Step 3 example currently shows -u <clientId>:<clientSecret>, matching today's behavior.

Related issues

Impacted areas

Authentication, Applications and Rate Limits pages of the API reference.

Steps to reproduce or test

Development

Content derived from the backend PR's implementation and description (endpoint parameters, validation rules, TTLs and rate limit verified against its diff and config).

QA

Once the backend change is deployed to sandbox, run the documented flow end to end: generate a proof key, authorize via /oauth2/authorize/start, and exchange the code with code_verifier.

Checklist

  • Add label Breaking Change if it applies.
  • Commits are atomic and logically separated.
  • Performance implications have been considered.
  • Security implications have been considered.
  • The new and updated code has good coverage.
  • API documentation, if required, has been created or updated.
  • New dependencies have been added to package.json.
  • The README file, if required, has been updated.
  • Architectural diagram, if required, has been updated.

Deploy notes

Merge only after uphold/backend#19003 is deployed to production, and after #250 merges (this PR is stacked on it). No files removed, so no slate index changes are needed.

🤖 Generated with Claude Code

Corrects the authentication section to match the current API behavior:
the token response shape (expires_in is omitted for non-expiring tokens,
token_type included), redirect_uri parameter and exact-match semantics,
multiple redirect URI support, OAuth error responses, PAT creation
authentication (requires an existing access token, not email/password),
PAT revocation semantics, the restricted availability of email/password
basic authentication, and the two-factor authentication headers
(OTP-Token, OTP-Method-Id). Adds the request challenge endpoint to the
One-Time Password section and the transactions:commit:otp scope.
Updates the global rate limit to the current 500 requests per 5-minute
window, removes the POST /password/reset row (no such limiter exists),
adds the authentication method challenge and email-destination
transaction limiters, and documents the too_many_requests error code.
@ricardobcl ricardobcl added blocked Do not merge! feature labels Aug 23, 2026
@ricardobcl ricardobcl self-assigned this Aug 23, 2026
Documents the Native Application Flow introduced by uphold/backend#19003:
proof key generation, the GET /oauth2/authorize/start endpoint, the
code_verifier token exchange parameter, loopback redirect URL matching
semantics, and the associated rate limit. Blocked until the backend
change is merged and deployed.
@ricardobcl
ricardobcl force-pushed the feature/add-pkce-documentation branch from e0c4a61 to ca60e2e Compare August 26, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Do not merge! feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant