OpenID vs OAuth: authentication vs authorisation
OAuth decides what an app may access, OpenID Connect proves who signed in. See the differences in a table, a simple analogy and why mixing them up is risky.
StandardsPublished
OAuth and OpenID Connect are often mentioned together, which is why people think they are alternatives. They are not. OAuth 2.0 handles authorisation: what an app is allowed to do. OpenID Connect handles authentication: who the user is. OpenID Connect is a thin layer on top of OAuth 2.0.
The short analogy
A hotel gives you a keycard at reception. The card opens your room and the spa for three nights. That is OAuth: access to specific things, for a limited time, without proving anything about you each time you tap it.
At check-in the receptionist also looked at your passport and wrote your name on the booking. That is OpenID Connect: someone with authority established who you are and handed the result to the system.
If a bar accepted the keycard as proof that you are the guest named on it, anybody who picked it up could claim to be you. That is exactly the mistake developers make when they treat an OAuth access token as a login.
Side-by-side comparison
| OAuth 2.0 | OpenID Connect | OpenID 2.0 (retired) | |
|---|---|---|---|
| Main question | What may the app access? | Who signed in? | Who signed in? |
| Result | Access token (opaque or JWT) | ID token (JWT) plus access token | Signed assertion passed as URL parameters |
| Built on | Own framework (RFC 6749) | OAuth 2.0 | Own protocol, no OAuth |
| Typical use | API access, open banking, app integrations | Sign-in, single sign-on | Early 2000s web logins |
| Describes the user? | No | Yes: standard claims such as sub, email |
Yes, via extensions |
| Status | Published standard, OAuth 2.1 in draft | Active, maintained by the OpenID Foundation | Superseded since 2014 |
How the two work together in one request
A “Sign in with …” button that also wants calendar access sends a single request with several scopes:
scope=openid email calendar.read
openid switches on OpenID Connect and makes the provider return an ID token. email asks for a standard identity claim. calendar.read is an ordinary OAuth permission. The app then receives two things:
- An ID token to learn who logged in.
- An access token to call the calendar API.
Step by step:
- The user clicks “Sign in” in the app.
- The app redirects to the provider with the scopes above.
- The provider authenticates the user and asks for consent.
- The app gets a code, exchanges it, and receives both tokens.
- The app validates the ID token to create a login session, and uses the access token only for API calls.
The mechanics are described in OAuth 2.0 explained and OpenID Connect explained.
Everyday examples
- Only OAuth: a photo-printing service gets permission to read one album. It does not need to know who you are.
- OpenID Connect: a news site lets you comment after you sign in with a social account, and only reads your name and email.
- Both: a project tool that signs you in with your company account and then reads your calendar to schedule meetings.
Security aspects
- Never accept an access token as proof of login. An attacker can obtain an access token for one app and replay it at another. An ID token carries an
audclaim naming the intended app and anonce, which blocks that. - Validate the ID token, not just receive it. Check signature, issuer, audience, expiry and nonce.
- Keep tokens in their lane. Send access tokens to APIs only; keep ID tokens inside your own app and session logic.
- Ask for the least. Request only the scopes you need. Broad scopes make consent phishing easier and cost trust.
- Authentication is not identity verification. Even a correct OpenID Connect login only says that someone controls an account. See identity vs authentication for the difference.
Common misconceptions
- “OAuth is for login.” It was designed for delegated access. Login became a side effect of how people used it, and OpenID Connect formalised it safely.
- “OpenID Connect replaces OAuth.” It does not. It needs OAuth underneath and adds identity on top.
- “An ID token can call APIs.” It cannot and should not. The ID token is for the app that requested it, the access token is for the API.
- “Both prove who I am legally.” Neither does. They show control of an account, not a verified legal identity.
Status and versions
OAuth 2.0 is RFC 6749, updated in practice by the security guidance in RFC 9700; OAuth 2.1 was still an Internet-Draft in October 2026. OpenID Connect Core 1.0 dates from 2014 and is published at openid.net/specs. OpenID 2.0 is no longer developed; the move away from it is covered in From OpenID to OpenID Connect and the protocol itself in OpenID 2.0.
Where the EU wallet fits
The EU Digital Identity Wallet goes one step further than both. It is not about logging in to an account or granting API access, but about carrying verified attributes, such as a name or an age confirmation, and showing only what is needed. The protocols for that, OpenID4VCI and OpenID4VP, reuse OAuth and OpenID Connect ideas such as authorisation codes, signed JWTs and redirect-based flows, which is why the foundations in this article are worth knowing before reading about the wallet.
Frequently asked questions
Do I need both OAuth and OpenID Connect?
If you only want to call another service's API for the user, OAuth is enough. If you also want to log users in, use OpenID Connect, which already includes OAuth. In practice most login integrations use both in one request.
Is 'Sign in with Google' OAuth or OpenID?
It is OpenID Connect running on top of OAuth 2.0. The login part is OpenID Connect, and any extra permissions, such as reading a calendar, are OAuth scopes.
Is OpenID the same as OpenID Connect?
Not exactly. 'OpenID' today usually means OpenID Connect, but the original OpenID 2.0 was a different protocol. When you read older articles, check which one is meant.
Which one does the EU wallet use?
Neither for login in the classic sense. The wallet uses OpenID4VCI and OpenID4VP, which borrow from OAuth and OpenID Connect but are designed for issuing and presenting credentials.
More in Standards
Decentralized identifiers (DIDs): what they are and do
A DID is a W3C identifier you control without a central registry. How DID documents work, how they relate to credentials, and their role in the EUDI Wallet.
FIDO2 and WebAuthn explained: the standards behind passkeys
FIDO2 combines WebAuthn and CTAP to replace passwords with phishing-resistant key pairs. How login works, what WebAuthn Level 3 adds and its EU wallet link.
Identity federation explained: one login, many services
Identity federation lets one trusted provider vouch for you across many services. How it works, the standards it uses, and how the EUDI Wallet changes it.
mdoc and ISO 18013-5: how mobile IDs work
mdoc is the ISO format behind mobile driving licences and one of two EUDI Wallet formats. How ISO 18013-5 and 18013-7 work, and what stays private.
OpenID4VCI explained: how credentials get into a wallet
OpenID for Verifiable Credential Issuance (OpenID4VCI) 1.0 brings credentials from issuers into a wallet. Roles, flow, security and its place in the EU wallet.
OpenID4VP explained: how a wallet presents credentials
OpenID for Verifiable Presentations (OpenID4VP) 1.0 is the protocol a wallet uses to show credentials to a service. Flow, roles, security and EU wallet role.