<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
jaycheng113/skill-retrieval-mcp/oauth-pkce
──Details
PublishedOctober 16, 2026 at 05:43 PM
Content Hashsha256:f6e86bed846e503b...
Git SHA7d034a2af4ac
──Files
Files (1 file, 1023 B)
SKILL.md1023 Bactive
SKILL.md · 24 lines · 1023 B

version: "1.0.0" name: oauth-pkce description: Implement the OAuth 2.0 authorization code flow with PKCE for a client that cannot keep a secret. category: security tags: [oauth, pkce, authentication, mobile]


Authorization code flow with PKCE

A native app or single-page app ships its source to the user, so it cannot hold a client secret. PKCE replaces the secret with a value proven only at redemption.

Generate a high-entropy code_verifier, then send its SHA-256 hash as code_challenge with code_challenge_method=S256. On redemption, present the verifier itself. An attacker who intercepts the authorization code cannot exchange it without the verifier, which never left the client.

The plain challenge method exists for constrained platforms and gives up the entire protection, since challenge and verifier are then identical. Do not use it.

Validate the state parameter on return. PKCE protects the code exchange; state is what protects against having a session fixated by a forged callback.

All versions