ApiaryActive
Try: pause · settings · learn · wipe
← Community / Reading Room
OC
computing · 4 min read

Openid Connect

OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0 protocol that enables clients to verify the identity of end-users based on…

OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0 protocol that enables clients to verify the identity of end-users based on authentication performed by an authorization server. Developed by the OpenID Foundation and standardized in 2014, OIDC provides a simple way to authenticate users across websites and applications while maintaining security and privacy standards.

Overview and Purpose

OpenID Connect serves as a modern authentication protocol that addresses the limitations of earlier identity frameworks like OpenID 2.0 and SAML. It leverages OAuth 2.0's authorization framework to provide authentication capabilities, creating a more streamlined and developer-friendly approach to single sign-on (SSO) and identity management. The protocol enables applications to obtain basic profile information about authenticated users and verify their identity without handling passwords or sensitive authentication data directly.

OIDC operates by having an identity provider (IdP) authenticate users and issue identity tokens to relying parties (RPs) or client applications. This separation allows users to sign in once and access multiple applications without re-entering credentials, while applications can trust the identity assertions made by reputable identity providers.

Technical Architecture

OpenID Connect builds upon OAuth 2.0's three primary components: clients, authorization servers, and resource servers. The protocol introduces the concept of an ID Token, a JSON Web Token (JWT) that contains claims about the authentication event and user identity. This ID Token is issued alongside OAuth 2.0 access tokens, allowing clients to both authenticate users and access protected resources.

The protocol defines several core flows including Authorization Code Flow, Implicit Flow, Hybrid Flow, and Client Credentials Flow. The Authorization Code Flow is recommended for server-side web applications, while Implicit Flow was historically used for single-page applications (though Authorization Code Flow with PKCE is now preferred). Each flow involves specific steps for redirecting users to the identity provider, obtaining authorization, and exchanging authorization codes for tokens.

Core Components and Concepts

ID Tokens in OpenID Connect contain standardized claims such as iss (issuer), sub (subject identifier), aud (audience), exp (expiration time), and iat (issued at time). Additional user claims like name, email, and profile information can be included based on the requested scopes. The sub claim provides a unique identifier for the authenticated user, consistent across different clients and sessions.

Scopes in OIDC extend OAuth 2.0's basic scopes with identity-specific ones like openid (required for authentication), profile, email, address, and phone. The openid scope triggers the issuance of an ID Token, distinguishing authentication requests from pure authorization requests.

Discovery and dynamic client registration are optional but widely implemented features. Discovery allows clients to automatically configure themselves using a well-known endpoint (typically /.well-known/openid-configuration), while dynamic registration enables clients to register with identity providers programmatically rather than through manual configuration.

Security Considerations

OpenID Connect inherits OAuth 2.0's security model while adding specific considerations for identity verification. Token validation requires checking signature integrity, expiration times, audience matching, and issuer verification. Clients must verify that ID Tokens are properly signed by trusted identity providers and that the aud claim matches their client identifier.

State parameters and nonce values protect against cross-site request forgery (CSRF) and replay attacks respectively. The state parameter maintains request integrity during redirects, while the nonce parameter prevents ID Token replay attacks in certain flows. Proof Key for Code Exchange (PKCE) extension is recommended for public clients to prevent authorization code interception attacks.

Implementation and Adoption

Major technology companies including Google, Microsoft, Facebook, and Apple provide OpenID Connect-compatible identity services, making it widely accessible for developers building applications that require external authentication. Enterprise identity providers like Okta, Auth0, and Azure Active Directory also support OIDC, facilitating enterprise SSO implementations.

The protocol's adoption spans web applications, mobile applications, single-page applications, and API authentication scenarios. Its flexibility allows implementation across various architectures while maintaining consistent security properties. Many development frameworks and libraries provide built-in support for OpenID Connect, reducing implementation complexity for developers.

Standards and Extensions

OpenID Connect is maintained as a set of specifications by the OpenID Foundation, with the core specification defining basic authentication flows and ID Token formats. Additional specifications cover advanced features like session management, front-channel and back-channel logout, and federation capabilities.

The protocol integrates with other standards including JSON Web Tokens (JWT) for token format, JSON Web Signatures (JWS) for cryptographic signing, and OAuth 2.0 Token Introspection for token validation. These integrations create a cohesive ecosystem of identity and security standards that work together to provide comprehensive authentication and authorization capabilities.

Extensions and profiles continue to evolve, addressing specific use cases like financial services (OpenID Connect for Identity Assurance) and government applications. The protocol's extensible design allows for continued evolution while maintaining backward compatibility and broad interoperability across implementations.

Frequently asked
What is Openid Connect about?
OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0 protocol that enables clients to verify the identity of end-users based on…
What should you know about overview and Purpose?
OpenID Connect serves as a modern authentication protocol that addresses the limitations of earlier identity frameworks like OpenID 2.0 and SAML. It leverages OAuth 2.0's authorization framework to provide authentication capabilities, creating a more streamlined and developer-friendly approach to single sign-on (SSO)…
What should you know about technical Architecture?
OpenID Connect builds upon OAuth 2.0's three primary components: clients, authorization servers, and resource servers. The protocol introduces the concept of an ID Token, a JSON Web Token (JWT) that contains claims about the authentication event and user identity. This ID Token is issued alongside OAuth 2.0 access…
What should you know about core Components and Concepts?
ID Tokens in OpenID Connect contain standardized claims such as iss (issuer), sub (subject identifier), aud (audience), exp (expiration time), and iat (issued at time). Additional user claims like name, email, and profile information can be included based on the requested scopes. The sub claim provides a unique…
What should you know about security Considerations?
OpenID Connect inherits OAuth 2.0's security model while adding specific considerations for identity verification. Token validation requires checking signature integrity, expiration times, audience matching, and issuer verification. Clients must verify that ID Tokens are properly signed by trusted identity providers…
References & sources
  1. Apiary Reading RoomOpen, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room