# OpenID Connect \(OIDC\)

An identity layer built on OAuth 2.0 that lets a client verify an end user's authentication and receive standardized identity claims.

- Type: framework
- Domain: Engineering & architecture
- Level: Intermediate
- Last reviewed: 2026-09-23
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/openid-connect/>)

## What it means

OpenID Connect \(OIDC\) extends OAuth 2.0 with authentication semantics. An OpenID Provider authenticates an end user and issues an ID Token containing claims for a specific client, while optional endpoints provide additional profile information. The ID Token and OAuth access token serve different audiences and purposes.

## Why it matters

OIDC gives web, mobile, and native applications an interoperable login protocol instead of custom password sharing. Discovery, signed ID Tokens, standardized claims, and explicit client audiences support federation and single sign-on.

## When to use it

Use OIDC when a client needs to sign users in through an identity provider or federate identity across applications. Use OAuth alone for delegated API authorization where client login identity is not required.

## How it works

1. Discover or configure the trusted OpenID Provider and register the client and redirect URIs.
2. Start an authorization-code flow with the openid scope, state, nonce, and PKCE.
3. The provider authenticates the user and obtains any required consent.
4. Exchange the code for an ID Token and, when needed, an access token.
5. Validate the ID Token signature, issuer, audience, nonce, time claims, and required assurance.
6. Create a local session and map only necessary claims to local accounts and policy.

## A practical example

An internal support tool redirects employees to the company identity provider. After validating the returned ID Token's issuer, audience, nonce, signature, and expiry, it creates a local session and applies its own authorization roles.

## Where it breaks

OIDC does not define an application's authorization policy or prove every real-world identity attribute. Federation adds provider dependency, account-linking risk, logout complexity, metadata management, and claim-privacy concerns.

## Common mistakes

- Treating an access token as the client's ID Token.
- Accepting a signed token without validating issuer, audience, nonce, and time claims.
- Using email alone as an immutable global account identifier.
- Assuming federated login automatically grants local permissions.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/openid-connect/#visualization-openid-connect>)

## Sources

1. [OpenID Connect Core 1.0](<https://openid.net/specs/openid-connect-core-1_0.html>) — OpenID Foundation · Technical specification
2. [Best Current Practice for OAuth 2.0 Security \(RFC 9700\)](<https://www.rfc-editor.org/rfc/rfc9700>) — RFC Editor · Best Current Practice

## Related topics

- [OAuth 2.0](<https://wiki.soroush.uk/topic/oauth-2-0/>)
- [Single Sign-On \(SSO\)](<https://wiki.soroush.uk/topic/single-sign-on/>)
- [JSON Web Token \(JWT\)](<https://wiki.soroush.uk/topic/json-web-token/>)
