OAuth 2.0 does not perform authentication itself: it issues a token for access to another party’s API but does not say who signed in. OpenID Connect adds an authentication layer on top of OAuth: the application delegates identity verification to a provider and receives an ID token — a signed statement about the user.
How sign-in works
The OpenID Foundation published the first version of the standard in February 2014. In it the application is called the Relying Party (RP) and the provider is the OpenID Provider (OP). Sign-in with the authorization code flow goes like this:
- the application redirects the browser to the provider and, in the authorisation request, asks for authentication: the mandatory
openidscope, astateparameter to protect against CSRF, and anoncethat will later come back in the ID token and rule out replayed requests; - the provider authenticates the user and obtains their consent to share data with the application;
- the provider sends the user back to the application with an authorisation code, which the application exchanges in a background request to the provider for an ID token and an access token;
- the application verifies the ID token’s signature and claims — after that the user counts as signed in.
Tokens and discovery
The main result is the ID token: the standard requires it to be signed and defines it as a JWT. With the iss claim the provider names itself, and with sub the user: this is a stable identifier within the provider that does not change after issue, so the application stores it as the account key. aud names the application the token was issued for, and exp and iat give the times. Alongside the ID token comes an ordinary OAuth access token: with it the application calls the UserInfo endpoint and gets the name, email and other profile fields, to the extent granted by the profile and email scopes. The signature is checked against the provider’s public keys, which the provider publishes in its discovery document, together with the addresses of the authorisation and token endpoints.
{ "iss": "https://id.example.com", "sub": "248289761001", "aud": "web-app", "nonce": "n-0S6_WzA2Mj", "exp": 1793448600, "iat": 1793448000}What the standard defines
| Part of the standard | What it does |
|---|---|
| Core | the mandatory minimum: scopes, the ID token, the authorisation and token endpoints |
| Discovery | a JSON document at /.well-known/openid-configuration listing addresses and supported features |
| Dynamic Client Registration | registering a client with the provider through an API |
Where it is used
Signing in with Google, Microsoft Entra ID, Apple and other external providers — social login with no password in your application. Corporate SSO portals: OpenID Connect works alongside SAML and often replaces it in new systems. Authentication providers and libraries for web and mobile applications offer OAuth and OIDC together: authentication is built on top of the same OAuth authorisation process.
Sources
the term is written from these pagesVerified 9 Nov