Skip to content
Computing Rich #oauth#authorization#pkce

OAuth 2.0 Authorization Code + PKCE

User to authz server, code back to app, code exchanged for token. PKCE blocks the interception attack.

A free, animated oauth 2.0 authorization code + pkce you can read here or embed on any website, from Scrollchart.

OAuth 2.0 Authorization Code + PKCE

OAuth 2.0 Authorization Code + PKCEImplicit grant + Resource Owner Password grant: DEPRECATED (RFC 9700)

A vertical sequence: client redirects user to authz server with code_challenge. User authenticates, approves scopes. Authz server returns an auth code to the client redirect URI. Client posts code + code_verifier to token endpoint, gets access + refresh tokens. PKCE stops a malicious app on the same device from redeeming a stolen auth code. Implicit and password-grant marked deprecated.

Good for

  • OAuth tutorials for SaaS integrations
  • OIDC explainers
  • Security blog posts on auth flows

Source & accuracy

This oauth 2.0 authorization code + pkce is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

The Redirect-Based Authorization Dance

OAuth 2.0 solves the problem of delegated access without sharing passwords. When a user logs into a third-party app (e.g., 'Sign in with GitHub'), the app redirects them to GitHub's authorization server. The user grants permission, and the server redirects back with an authorization code. The app exchanges this code for an access token, which grants temporary permission to act on the user's behalf.

This flow keeps the user's password away from the third-party app. Only the authorization server sees the password; the app sees only the token. If the app is compromised, tokens can be revoked without changing the user's password.

PKCE: Protecting the Exchange

Proof Key for Public Clients (PKCE) adds a cryptographic handshake to defend against interception attacks. Before redirecting to the authorization server, the public app generates a random challenge string and derives a code verifier. When exchanging the authorization code for a token, the app proves it still possesses the verifier, cryptographically tying the code to the initial request.

This prevents an attacker who intercepts the redirect URL from using the authorization code themselves. PKCE is now mandatory for public clients (mobile apps, single-page applications) and recommended for all OAuth deployments, as it costs little and neutralizes an entire attack surface.

Embed this diagram

Add this animated oauth 2.0 authorization code + pkce to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated oauth 2.0 authorization code + pkce for any website.
Who uses it
Developer blogs, Security blogs, CS educators.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="oauth2-flow" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "OAuth 2.0 Authorization Code + PKCE" for my website?
Scrollchart provides "OAuth 2.0 Authorization Code + PKCE" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a oauth 2.0 authorization code + pkce in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.