- What is PKCE?
- Proof Key for Code Exchange — an OAuth 2.0 extension that prevents authorization code interception attacks. Required for mobile apps and SPAs.
- What does the tool generate?
- code_verifier (random 43-128 char string), code_challenge (SHA-256 of the verifier, base64-url-encoded), and state (CSRF protection token).
- Where do these go?
- code_challenge on the /authorize request; code_verifier on the /token request. state is a round-trip parameter to prevent CSRF.
- Why SHA-256 for the challenge?
- The 'S256' method. There's also 'plain' (just use verifier as challenge) but it's not secure. Always use S256.