← Integration Engineering
Integration Engineering

OAuth Gives Access. OpenID Connect Tells You Who Logged In.

13 Oct 2026·3 min read

Both buttons open a Google page, ask you to approve, and send you back. So people assume they are the same thing. They share a base, but they answer different questions.

  • OAuth answers: what is this app allowed to do? It gives an access token for an API.
  • OpenID Connect (OIDC) answers: who is this person? It adds an ID token that says who logged in.

OIDC is a layer on top of OAuth

OAuth alone has no standard way to tell your app who the user is. OIDC adds it. The flow is the normal OAuth flow, but the request must include the scope openid. Then the token response has an ID token next to the access token. "Sign in with Google" is usually OIDC: Google says its OAuth 2.0 APIs follow OpenID Connect.

{
  "iss": "https://auth.example.com",
  "sub": "24400320",
  "aud": "my-app-id",
  "exp": 1311281970,
  "iat": 1311280970
}
Example shape of a decoded ID token, not a real one. The field names are the required claims in OpenID Connect Core 1.0; the sub, exp and iat values are taken from the spec’s own example.

sub is the user’s ID at that provider, and the spec says it is never reassigned to another user. So store users by iss + sub, not by email. People change email addresses.

ID token for your app, access token for the API

The ID token names your app in aud. Your app reads it, checks it, and starts a session. The access token is for the API; your app sends it. Do not send one where the other belongs. One is a name badge, the other is a door key.

Many providers support both in one login. One approval can log the user in and connect their account.

Do this in 60 secondsFind where your app stores logged-in users. If the unique key is the email address, write a note to add iss and sub.
Today’s AI angleAn AI agent needs both answers. The ID token says which user is talking to it; the access tokens are what its tools send to each API. The model should never see either token.
OAuth Gives Access. OpenID Connect Tells You Who Logged In. · Ali Huzaifa