Antonio Braccolino, Identity & Access, home
EN · Language: English
← All terms

IAM glossary

What is ID token?

The OIDC token, always a JWT, that tells the app who signed in and how. It is for the app, not for APIs: check signature, iss, aud, exp and nonce before trusting it.

How it works

The ID token is what OpenID Connect adds to OAuth. It is always a signed JWT, issued to the client app (its aud is the app’s client_id), and it tells the app who signed in (sub), at which provider (iss), when (auth_time), how (amr, acr) and for which login request (nonce).

The app must validate it before trusting it: signature with the provider’s keys, iss, aud, exp and nonce. After that it can create its own session. The ID token is not meant to be sent to APIs: that is the access token’s job.

A simple example

After “Sign in with Microsoft”, a project app receives an ID token with "iss": "https://login.microsoftonline.com/.../v2.0", "aud": "project-app", "sub": "AAAAA...", "name": "Luca Neri". It checks the signature and the nonce it had sent, then shows “Hi Luca” and creates a session cookie.

Common mistakes

  • Sending the ID token to an API as if it were an access token.
  • Skipping the nonce check, which allows replaying an old token.
  • Decoding it without verifying the signature and trusting what it says.

See it at work