OIDC
An identity layer on OAuth 2.0 that returns a signed ID token telling the client who the user is and how they authenticated.
OIDC adds the openid scope to an OAuth flow. Alongside the access token, the client receives an ID token: a JWT signed by the identity provider containing iss, sub, aud, exp, iat, often nonce, auth_time, acr and amr. Discovery (/.well-known/openid-configuration) and JWKS endpoints let clients find keys automatically.
It is the default for modern SSO and has displaced SAML for new apps. It is also the basis of workload identity federation: CI systems such as GitHub Actions issue OIDC tokens that cloud providers accept in place of stored keys.
Common mistakes: sending the ID token to APIs (it is for the client; APIs take access tokens), not checking aud so a token for another app is accepted, ignoring nonce, and identifying users by email instead of iss plus sub.
Learn it properly
Compared
Also used in
- The round, the framework, the numbersHLD · The security HLD roundFree
- Design a zero-trust access gatewayHLD · Design problems: Access & identityFree
- Design an MFA and step-up serviceHLD · Design problems: Access & identityFree
- Secrets management and rotationSecEng · Identity & Access EngineeringPro
- Workload identity and federationSecEng · Identity & Access EngineeringPro
- Zero trust reference architectureSecEng · Advanced: Security Architecture at ScalePro
- Design a secrets managerHLD · Design problems: Infrastructure & dataPro
- Design a Kubernetes admission control serviceHLD · Design problems: cloud & runtime securityPro