OpenID Connect
Cheat sheet · https://pcornel.dk/topic.php?topic=4495
Answer
OpenID Connect (OIDC) adds authentication to OAuth 2.0, returning an ID token with user identity, plus a standard user info endpoint and discovery. It is the common choice for modern SSO.
Remember
- OIDC adds ID tokens and userinfo to OAuth 2.0.
- Discovery document lists endpoints and keys.
- Validate tokens fully.
First checks
curl -s https://<idp>/.well-known/openid-configuration | jq .issuer,.jwks_uri— discovery- ID token validation: iss, aud, exp, nonce — checks
curl -s <jwks_uri> | jq '.keys[].kid'— signing keys
Verify in this order
authorize request (state, nonce, PKCE) → OP authentication → code to redirect_uri → token endpoint exchange → ID token validation (iss, aud, signature/JWKS, exp, nonce) → account mapping (iss + sub) → RP session
Where it usually breaks
First mismatch in identity lifecycle → authenticator/credential → IdP/federation/session → authorization policy → target resource → audit trail; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4495