Dōrvis

Sign in

OpenID Connect vs OAuth 2.0: the difference and when to use each

OpenID Connect vs OAuth 2.0: OAuth 2.0 gives an app access to a resource, while OpenID Connect tells it who the user is. Login with Smart-ID, eParaksts or a bank is authentication, so Dorvis uses OpenID Connect.

Dorvis team 12 October 2026 2 min read

In this article
  1. The difference in one table
  2. Why plain OAuth 2.0 is not meant for login
  3. The Authorization Code flow with OpenID Connect
  4. What Dorvis returns
  5. Where this helps in practice

The difference in one table

OAuth 2.0OpenID Connect
PurposeAuthorization: access to an API or resource on the user's behalfAuthentication: who the user is
StandardRFC 6749 (IETF, 2012)OpenID Connect Core 1.0 (OpenID Foundation, 2014), built on OAuth 2.0
What the app getsaccess_tokenid_token (a JWT with identity claims), usually plus an access_token
ScopesFree-form, e.g. read:invoicesopenid is required, plus profile, email and others
User dataNot standardisedStandard claims in the id_token and /userinfo
ConfigurationNo standard discovery/.well-known/openid-configuration (discovery)

Why plain OAuth 2.0 is not meant for login

An OAuth 2.0 access_token is a key the app shows to an API. It does not tell the app which person granted access, and its format is not standardised. An app that "logs in" a user just because it received an access token relies on assumptions the standard does not guarantee.

OpenID Connect adds the missing piece: a signed id_token carrying the issuer (iss), audience (aud), expiry and a user identifier (sub). Your system verifies the signature with the issuer's public keys (JWKS) and knows reliably who logged in.

The Authorization Code flow with OpenID Connect

  1. Redirect

    Your portal sends the user to the authorization_endpoint with response_type=code and scope=openid profile. Use PKCE.

  2. Authenticate

    The user logs in – with Dorvis, via Smart-ID, eParaksts, a bank or Digimaks.

  3. Exchange the code

    Your server exchanges the code at the token_endpoint for an id_token and access_token.

  4. Validate

    Your server checks the id_token signature, iss, aud and expiry, then reads the identity claims.

What Dorvis returns

Dorvis is an OpenID Connect provider. Its discovery URL is https://dorvis.eu/oidc/.well-known/openid-configuration, and after login your system receives these identity claims.

{
  "sub": "…",
  "given_name": "Jānis",
  "family_name": "Bērziņš",
  "person_code": "010101-12345"
}
Sample data. Claim names as in the Dorvis documentation.

Where this helps in practice

Most platforms already support OpenID Connect: Keycloak, Auth0, Microsoft Entra, WordPress, Spring Security, ASP.NET Core and the Node.js libraries. Adding Dorvis usually requires only configuration – see the developer guides.

Last reviewed:

Try OpenID Connect with Digimaks for free

Once the Dorvis team has created your account, create an integration in the self-service portal and test the full flow in your own test environment once test credentials are issued.

Loading complete

We use cookies to make this website easier to use. Read our Privacy and Cookie Policy.