SecurityZines.com Join

OAuth 2.0 Flows

Which grant type to use, and when

Identity & AuthSketchnote

OAuth 2.0 Flows (Which grant type to use, and when): hand-drawn explainer poster

Authorization Code: the browser gets a short-lived code, and the app's backend swaps it for tokens. Add PKCE so a stolen code is useless; PKCE is now recommended for every client, including mobile and single-page apps.

Client Credentials: machine-to-machine. No user involved; the service authenticates with its own secret.

Device Code: for TVs and CLIs that cannot open a browser: the user approves on another device.

Avoid: the Implicit flow (tokens in the URL) and the Resource Owner Password flow (the app sees the password). The OAuth 2.1 draft drops both.

More on Identity & Auth

All 7

Get the next one by email

New posters land in the Security Zines newsletter on Substack. Free, no spam.