Authorization code flow with PKCE
Dashed arrows pass through the browser, where URLs leak. Solid arrows are direct TLS calls. Orange steps carry the bearer token.
/authorize with client_id, scope, state, code_challengeredirect_uri?code=…&state=… (single-use, short-lived code)statePOST /token with the code and code_verifier; server checks the verifier hashes to the challengeaccess_token and often a refresh_token. The client must now store them.Authorization: Bearer <access_token> on every API call, with no password and no MFA