Vezi pagina în română

IT Glossary

What is OAuth (Open Authorization) and how does it work?

The authorization standard that lets an application use data in your account at another service, with limited, revocable rights — authorization, not authentication.

7
sections
5
questions answered

OAuth (Open Authorization) is the open authorization standard by which an application, with your consent, gets limited and revocable access to your data in another service through a token issued by that service, without ever learning your account password. OAuth is authorization, not authentication: it says what the application may do, not who you are; identity is established by OpenID Connect, the layer built on top of OAuth 2.0 (the Continue with Google button). The version in use today is OAuth 2.0 (RFC 6749, October 2012), supplemented by the security rules in RFC 9700 (January 2025); OAuth 2.1 is still an IETF draft (checked on 18 November 2026).

The classic image is the valet key: it starts the car but will not open the boot. When an accounting application wants to read your bank statements, you never give it your banking password; the bank asks you to confirm, then issues the application a ticket (a token) valid only for statements, for a limited period, and revocable at any moment. Your password never leaves the bank. The same standard sits underneath every Continue with Google button, open banking, and most integrations between modern services; in Romania, ANAF's e-Factura API uses OAuth 2.0. For a company the standard matters in both directions: your own products can request access to customer data without ever touching their passwords, which removes an enormous legal risk, and when buying software, a vendor who asks for your account password instead of offering an OAuth flow has just advertised their real security level free of charge.

Why it matters for your business

Customer passwords never pass through your system

Your application receives only tokens with limited rights — a breach on your side does not expose customers’ Google, banking or Microsoft passwords.

Exactly as much access as needed, for as long as needed

The token carries precise permissions, such as read statements only or send email only, and expires by itself — the damage any incident can do is capped by construction.

Revocation without changing passwords

A customer withdraws an application’s access with one click from their own account — no password change, and no impact on the other connected services.

How OAuth works: four roles and one flow

RFC 6749 (section 1.1) defines four roles. The resource owner is you, who owns the data. The client is the application requesting access. The authorization server is the service that identifies you, asks for your consent and issues the token. The resource server is the API that holds the data and accepts the token.

The usual flow, authorization code, has four steps: (1) the application sends you to the authorization server; (2) you sign in there and confirm exactly which permissions (scopes) the application gets; (3) the server sends the application a single-use authorization code; (4) the application exchanges the code, together with the PKCE proof (code_verifier), for an access token and usually a refresh token. Your password never passes through the application.

When no person is in the loop, for example one server calling another, the client credentials flow is used: the application identifies itself, with no consent screen. Tokens in general are explained on their own page.

OAuth, OpenID Connect and SSO: what each one solves

OAuth issues an access token, a proof that the application may do certain things. It does not say who signed in. For identity there is OpenID Connect Core 1.0, an identity layer built on top of OAuth 2.0, which adds the ID token (a JWT) carrying the authenticated user's details. The specification is also standardised as ISO/IEC 26131:2024.

Single sign-on (SSO) is the experience, one login for several applications, usually built on OpenID Connect or SAML. That is why Continue with Google uses OAuth for access and OpenID Connect for identity.

Want an estimate for your project?

Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.

Book a free call

OAuth versions and the security rules that apply today

OAuth 1.0 is RFC 5849 (April 2010). It was obsoleted by OAuth 2.0, RFC 6749 (October 2012), so 2.0 is the successor, not the predecessor. Bearer tokens are described in RFC 6750 and PKCE in RFC 7636. Nobody should start a new project on OAuth 1.0.

The current security rules are in RFC 9700 (BCP 240, January 2025). PKCE is mandatory (MUST) for public clients, meaning mobile, single-page and desktop apps, and recommended for confidential ones. The implicit grant should no longer be used (SHOULD NOT), and the resource owner password credentials grant is forbidden (MUST NOT). Refresh tokens of public clients must be sender-constrained or rotated, and access tokens should carry the minimum privileges.

OAuth 2.1 is draft-ietf-oauth-v2-1-17, published on 31 October 2026. It is still an Internet-Draft, not an RFC. The draft builds PKCE into the authorization code flow, removes the implicit and password grants, requires exact redirect-URI matching and drops the PKCE "plain" method. Checked on 18 November 2026 at rfc-editor.org and datatracker.ietf.org.

OAuth at ANAF: the e-Factura and e-Transport APIs

ANAF's application registration procedure (OAuth profile, PDF dated 17 October 2024) uses OAuth 2.0. The authorization server is logincert.anaf.ro and the protected API is api.anaf.ro. The user signs in with a qualified digital certificate enrolled in SPV with a legal-entity right (legal representative, designated person or proxy), and the token reflects both the user's rights and the application's registration. Covered services include e-Factura and e-Transport.

The ANAF access token is a JWT valid for 129,600 minutes, that is 90 days, and the refresh token for 525,600 minutes, that is 365 days. The limit is 1,000 calls per minute, and storing tokens securely is the application developer's responsibility.

The consequence for a company: a stolen ANAF access token gives up to 90 days of access to the company's e-Factura messages, and a stolen refresh token, together with the application's credentials, can produce new tokens for up to 365 days. Keep them encrypted, never in Excel or email. If a token is compromised, the ANAF procedure requires sending it to ANAF to be blocked. When an employee or vendor leaves, change the application credentials and issue new tokens. The cost of an e-Factura integration is covered separately on the pricing page.

For a company: what to ask a vendor

Never give a vendor your account password. Ask for an OAuth flow with PKCE, minimal permissions (scopes), short-lived access tokens with refresh-token rotation, a clear revocation path and tokens stored encrypted. A vendor using the password grant does exactly what RFC 9700 explicitly forbids (MUST NOT).

Frequently asked questions

Is OAuth authentication or authorization?

Authorization: OAuth defines what an application may do on your behalf, not who you are. Identity comes from OpenID Connect, built on top of OAuth 2.0. The Continue with Google button uses both: OpenID Connect for the login and OAuth for the application's access to your data.

Which OAuth version is used in 2026?

OAuth 2.0 (RFC 6749, 2012), together with the security rules in RFC 9700 (January 2025). OAuth 2.1 is still an IETF draft on 18 November 2026, not an RFC. OAuth 1.0 (RFC 5849) is of historical interest only and does not belong in new integrations.

What happens if an OAuth token is stolen?

The attacker can use only that token's permissions, until it expires or is blocked. The issuer sets the lifetime: ANAF's e-Factura access token lasts 90 days. That is why encrypted storage and fast blocking matter (at ANAF, a compromised token is sent to ANAF to be blocked).

OAuth or JWT: what is the difference?

They are different things. JWT (RFC 7519) is a token format. OAuth is the framework that issues tokens. An OAuth access token can be a JWT, as ANAF issues, or an opaque string with no structure visible to the application.

Does it cost anything to use OAuth?

The standard is open, with no licence. The real cost is implementing it correctly in your application and, if you choose one, an identity provider. The price depends on the integration, not on OAuth itself, so ask for a quote for your concrete flows.