OAuth 2.0 PKCE Flow Debugger
Generate PKCE code verifier/challenge pairs, build authorization URLs, and get ready-to-run token exchange commands for OAuth 2.0 PKCE flows.
OAuth Provider Settings
Generated PKCE Values
Authorization URL
Redirect the user's browser to this URL to start the authorization flow.
Token Exchange curl (after receiving authorization_code)
Generating…
Replace AUTHORIZATION_CODE with the code received in the redirect callback.
Frequently Asked Questions
What is PKCE and why is it needed?▼
PKCE (Proof Key for Code Exchange) is a security extension to OAuth 2.0 that protects against authorization code interception attacks. It replaces the client_secret for public clients (SPAs, mobile apps) by using a cryptographically random code_verifier and its SHA-256 hash (code_challenge) that prove the same client that started the flow is completing it.
What is the difference between code_verifier and code_challenge?▼
The code_verifier is a cryptographically random string (43-128 characters) generated fresh for each authorization request. The code_challenge is the BASE64URL-encoded SHA-256 hash of the code_verifier. You send the challenge in the authorization request and the verifier in the token exchange request.
What characters are allowed in a code_verifier?▼
Per RFC 7636, the code_verifier must only use unreserved URI characters: A-Z, a-z, 0-9, hyphen, period, underscore, and tilde. It must be between 43 and 128 characters long. Do NOT use base64 standard encoding — use base64url (URL-safe, no padding).
What should the redirect_uri be for a SPA?▼
For a SPA, the redirect_uri is typically the same origin as your app, e.g. `https://myapp.com/callback`. During development, `http://localhost:3000/callback` is commonly used. The exact URI must match what's registered in your OAuth provider's settings.
Is PKCE safe to use without a client_secret?▼
Yes — that's the point. PKCE was designed for public clients that cannot safely store a client_secret. The code_verifier/challenge pair provides equivalent security guarantees for single-use authorization codes without requiring a secret embedded in client-side code.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
OAuth2 Flow Visualizer
Visualize OAuth2 authorization flows step by step. Compare Authorization Code, PKCE, Implicit, Client Credentials, and Device Code flows with JS code examples.
Open free tool →
API Response Mock Generator
Generate realistic mock API responses with custom status codes, headers, and JSON body. Quick templates for 200, 401, 404, 429, 500 and more. Runs in your browser.
Open free tool →
More Free Tools
Related Articles
JWT Authentication Best Practices 2026: Secure Your API Tokens
Complete JWT security guide for 2026. Covers RS256 vs HS256 signing, token storage strategies, expiry and refresh token patterns, revocation, common vulnerabilities, and a production security checklist.
API Rate Limiting: Algorithms and Implementation Guide 2026
Complete guide to API rate limiting in 2026. Token Bucket, Leaky Bucket, Sliding Window algorithms with Node.js and Redis implementations, distributed rate limiting, 429 handling, and best practices.
Supabase Auth vs Clerk vs Auth0 vs Firebase Auth 2026
Complete comparison of the top authentication solutions for modern apps in 2026. Pricing, DX, Next.js integration, OAuth, MFA, magic links — pick the right auth for your project.
Web Authentication Patterns in 2026: OAuth, Passkeys, and JWT Best Practices
A complete guide to modern web authentication: OAuth 2.0/OIDC, Passkeys/WebAuthn, JWT best practices, session management, and MFA strategies for secure apps.
Base64 Encode/Decode Explained: When and How to Use It
Understand when to use Base64 encoding and when to avoid it. This guide explains the Base64 algorithm, practical use cases, code examples in JavaScript, Python, Go, and more.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →