OAuth
Installation
SKILL.md
Flow Selection
- Authorization Code + PKCE: use for all clients—web apps, mobile, SPAs
- Client Credentials: service-to-service only—no user context
- Implicit flow: deprecated—don't use; was for SPAs before PKCE existed
- Device Code: for devices without browsers (TVs, CLIs)—user authorizes on separate device
PKCE (Proof Key for Code Exchange)
- Required for public clients (SPAs, mobile), recommended for all
- Generate
code_verifier: 43-128 char random string, stored client-side - Send
code_challenge: SHA256 hash of verifier, sent with auth request - Token exchange includes
code_verifier—server verifies against stored challenge - Prevents authorization code interception—attacker can't use stolen code without verifier