| 1 | browser | carries you between the sites; holds cookies, never tokens | your laptop | nothing: it follows redirects | a sign-in loop, or a callback without its session cookie |
|---|
| 2 | print shop server (client) | asks for scopes, swaps the code, calls the API | localhost:3000 | which scopes to ask for; whether state and nonce match | 400 state mismatch; invalid_client at /token |
|---|
| 3 | session record | keeps the tokens on the server behind sid | the print shop’s server | which tokens belong to which browser | tokens in localStorage, readable by any script on the page |
|---|
| 4 | access token (JWT) | lets the API serve one scope for 300 seconds | the session record | nothing: it is checked | 401 token expired; 403 insufficient_scope |
|---|
| 5 | ID token | tells the print shop who signed in | the session record | nothing: the print shop checks it | nonce mismatch; 401 “typ None is not an access token” at an API |
|---|
| 6 | refresh token | gets new access tokens without you, once each | the session record | nothing: it goes only to /token | 400 invalid_grant: reused or revoked |
|---|
| 7 | DPoP key pair | binds tokens to a key that never leaves | the print shop’s server | signs one proof per request | 401 “proof key does not match the token” |
|---|
| 8 | authorization endpoint /auth | signs you in and asks for Allow | the sign-in server | exact redirect URI, your password, your consent | a redirect URI error page; error=access_denied |
|---|
| 9 | grant | records what you allowed this client | the sign-in server | which tokens may be issued | after it is revoked, every refresh gets invalid_grant |
|---|
| 10 | token endpoint /token | swaps a code or a refresh token for tokens | the sign-in server | client secret, code, PKCE verifier | 400 invalid_grant; 401 invalid_client |
|---|
| 11 | signing key | signs every JWT | the sign-in server (a KMS in production) | nothing: whoever holds it can mint tokens | a leaked key means forged tokens every API accepts |
|---|
| 12 | discovery document + JWKS | publish every endpoint and the public keys | /.well-known/openid-configuration and /jwks | nothing: they are read | no key for a token’s kid |
|---|
| 13 | introspection + revocation | answer “is it active?”; cancel a grant | the sign-in server | its own records | unsupported_token_type for a JWT it never stored |
|---|
| 14 | sign-in session | keeps you signed in across apps | the sign-in server, through its own cookie | whether to show the password form again | signing out of an app leaves you signed in |
|---|
| 15 | photo API (resource server) | checks each token locally, serves photos | localhost:4000 | alg allow-list, signature, iss, aud, exp, scope | 401 invalid_token; 403 insufficient_scope |
|---|
| · | authorization code | a one-time, 60-second string through the browser | the callback URL | nothing: it is swapped | invalid_grant after 60 seconds or a second use |
|---|
| · | state and nonce | tie the callback and the ID token to this sign-in | the print shop’s session | match or refuse | 400 state mismatch; nonce mismatch |
|---|
| · | PKCE verifier and challenge | prove the code’s holder started the sign-in | verifier on the print shop, challenge at the sign-in server | SHA-256 of the verifier equals the challenge | invalid_grant |
|---|
| · | sid cookie | an HttpOnly pointer to the session record | the browser | nothing: it is sent | the callback loses its session with SameSite=Strict |
|---|