HomeCybersecurityOAuth2 Authorization Code + PKCE Flow

OAuth2 Authorization Code + PKCE Flow

Interactive 3D simulator of the OAuth 2.1 Authorization Code flow with PKCE: watch redirects, the authorization code, and token exchange move between browser, client app, authorization server, and resource server, with a live stolen-code interception attack to show why PKCE matters.

Cybersecurity3DModerate60 FPS
oauth2-oidc-flows ↗ Open standalone

This simulator renders the OAuth 2.1 Authorization Code flow with PKCE as a live 3D message-passing diagram between four real actors — the user's browser, the client application, the authorization server, and the protected resource server — computing the actual SHA-256 code_verifier/code_challenge pair with the browser's own WebCrypto API rather than faking it. Step through or auto-play all eight protocol messages, then flip on a stolen-authorization-code attack to see, message by message, exactly why PKCE's proof-of-possession check blocks token theft that would otherwise succeed against a bare Authorization Code flow.

⚙ Under the hood

An interactive 3D simulator of the OAuth 2.1 Authorization Code flow with PKCE, computing real SHA-256 code_verifier/code_challenge pairs and demonstrating a stolen authorization code attack to show why PKCE matters.

oauth2oidcpkceauthenticationcybersecurityweb-security

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)