OpenID Connect sign-in: authorization code flow with PKCE
OpenID Connect adds identity to OAuth 2.0: a signed ID token that tells an app who signed in. The sign-in flow drawn step by step, what is inside an ID token and how to validate it, which token goes where, logout, and when to use OIDC, OAuth or SAML.
Opens a copy in the editor, in a new tab, ready to change. No account needed.
What’s in this diagram
services and parts
- You
- App you sign in to (relying party)
- /authorize (authentication)
- /token endpoint
- Signing keys (JWKS)
- /userinfo
groups
- OpenID provider
Key points
- OAuth gives an app an access token for an API. OpenID Connect adds an ID token that tells the app who signed in.
- Ask for
scope=openidand use the authorization code flow with PKCE. It is the same OAuth flow with one more token back. - The ID token is for the app, never for an API. The access token is for the API, and the app should not read it.
- Validate every ID token: signature, issuer, audience, expiry and nonce.
The whole story, step by step: OpenID Connect explained: ID tokens, flows and when to use OIDC.


