OAuth vs OAuth 2.0: What Changed and Why It Matters

Markaretta DofourMarkaretta Dofour12 min read

OAuth 2.0 replaced OAuth 1.0’s per-request cryptographic signatures with bearer tokens sent over TLS, split the authorization server from the resource server, added short-lived access tokens with refresh tokens, and defined separate grant types for web apps, mobile apps, services and devices. The two versions are not compatible: RFC 6749 says plainly in its introduction that “the OAuth 2.0 protocol is not backward compatible with OAuth 1.0”, and its abstract says it “replaces and obsoletes” it. OAuth 1.0 is obsolete, so build on OAuth 2.0 and follow the OAuth 2.1 practices: authorization code with PKCE, no implicit or password grant, and sender-constrained tokens where you can.

When people search “OAuth vs OAuth2” they usually mean OAuth 1.0 (or its revision 1.0a) against OAuth 2.0, because there is no protocol called plain “OAuth” today. This post puts the three versions side by side in one table, shows a real OAuth 1.0 signed request next to an OAuth 2.0 bearer call, explains why you cannot upgrade from one to the other in place, and then spends a full section on OAuth 2.1, which is where a new project should land. It ends with a short Keycloak setup that follows those rules.

OAuth 1.0, 2.0 and 2.1 side by side

OAuth is a way to let an application act on a user’s behalf at another service without the user handing over their password. All three versions share that goal, but they reach it in very different ways. The table summarises the differences that matter when you build or integrate, and the sections after it explain each one.

OAuth 1.0 / 1.0a OAuth 2.0 OAuth 2.1 (draft)
Specification RFC 5849, April 2010, Informational RFC 6749 and RFC 6750, October 2012 draft-ietf-oauth-v2-1, still in progress
How a request proves it is allowed Every request carries a signature (HMAC-SHA1, RSA-SHA1 or PLAINTEXT) The request carries a bearer token; TLS protects it in transit Bearer by default, with sender-constrained tokens (DPoP or mTLS) encouraged
Transport security Signatures work without TLS (PLAINTEXT needs it) TLS is mandatory TLS is mandatory
Server roles One “server” issues tokens and serves resources Separate authorization server and resource server Same as 2.0
Token lifetime No refresh mechanism in the spec Access tokens plus optional refresh tokens Refresh tokens for public clients must be rotated or sender-constrained
Client types and flows One three-legged redirect flow Authorization code, implicit, password, client credentials, plus extensions such as the device grant Authorization code with PKCE, client credentials, refresh token; implicit and password removed
Status today Obsolete, survives in some older APIs Current, with security updates in RFC 9700 Consolidates 2.0 and its best practices

The OAuth 1.0 column draws on RFC 5849, the 2.0 column on RFC 6749 and RFC 6750, and the 2.1 column on the list of changes kept at oauth.net/2.1.

What changed from OAuth 1.0 to OAuth 2.0

Signatures gave way to bearer tokens over TLS

In OAuth 1.0, the client proves on every single call that it holds two secrets: its own client secret (the “consumer secret”) and the secret that came with the user’s token. It does that by building a normalised string from the HTTP method, the URL and every parameter, and signing it. RFC 5849 defines three signature methods, HMAC-SHA1, RSA-SHA1 and PLAINTEXT, and adds a timestamp and a nonce (a random value used once) so the server can reject a replayed request. Here is the signed request from section 3.1 of that RFC:

POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Example",
               oauth_consumer_key="9djdj82h48djs9d2",
               oauth_token="kkk9d7dh3k39sjv7",
               oauth_signature_method="HMAC-SHA1",
               oauth_timestamp="137131201",
               oauth_nonce="7d8f3e4a",
               oauth_signature="bYT5CMsGcbgUdFHObYMEfcx6bsw%3D"

c2&a3=2+q

The design has a real security benefit, because a stolen signed request cannot be reused for a different call and the secrets never travel over the wire. In practice, though, developers found signing hard to get right: one difference in how a parameter is encoded or sorted produces a different signature, and the server answers with a generic “invalid signature” that says nothing about which byte was wrong.

OAuth 2.0 dropped signing from the core protocol. The client sends a bearer token, which RFC 6750 defines as “a security token with the property that any party in possession of the token (a “bearer”) can use the token in any way that any other party in possession of it can.” The same RFC makes TLS “mandatory to implement and use”, because TLS is now the only thing protecting the token in transit. The equivalent call, from section 2.1 of RFC 6750, is a single header:

GET /resource HTTP/1.1
Host: server.example.com
Authorization: Bearer mF_9.B5f-4.1JqM

An OAuth 1.0 client signs each request and the API recomputes the signature, while an OAuth 2.0 client sends a bearer token inside TLS and the API only validates the token

With OAuth 1.0 the client signs each request with its consumer and token secrets, and the API recomputes the signature and checks the nonce. With OAuth 2.0 the client sends a bearer token inside a TLS connection, and the API only has to validate the token.

This made OAuth 2.0 far easier to call from any HTTP client, and it is the main reason the protocol spread so quickly. The cost is that a leaked bearer token works for whoever holds it until it expires, which is the trade-off OAuth 2.1 and the sender-constrained token specifications come back to later in this post.

The authorization server and resource server became separate roles

RFC 5849 talks about a single “server” that both issues tokens and hosts the protected resources. RFC 6749 splits that into an authorization server, which authenticates the user and issues tokens, and a resource server, which hosts the API and accepts tokens, and it notes that the two may be the same server or separate ones. That split is what lets one identity server such as Keycloak issue tokens for many APIs, and what lets each API validate a token without knowing anything about passwords or login screens.

Access tokens got shorter lives and refresh tokens arrived

OAuth 1.0 has no way to renew a token, so providers tended to issue tokens that lasted until the user revoked them. OAuth 2.0 introduced the refresh token (section 1.5 of RFC 6749): the client holds a short-lived access token for API calls and a separate refresh token it sends only to the authorization server to get a new access token. A leaked access token then stops working quickly, and the server gets a regular point at which it can refuse to renew access.

One flow became several grant types

OAuth 1.0 has one three-legged redirect flow designed around a browser and a server-side web app. RFC 6749 defines “four grant types: authorization code, implicit, resource owner password credentials, and client credentials”, and it was built to be extended, so later RFCs added flows such as the device authorization grant for TVs and command-line tools (RFC 8628). Our guide to choosing the best authorization flow for your app explains which grant fits which kind of client, and the Keycloak device flow guide walks through the device grant in practice.

Why OAuth 2.0 is not backward compatible, and how to move off 1.0

The two versions disagree at the level of the HTTP request itself. A 1.0 resource server expects an Authorization: OAuth header with a signature it can verify, and a 2.0 resource server expects Authorization: Bearer with a token it can validate, so neither can read the other’s requests. The endpoints differ too: 1.0 has a request-token endpoint, an authorization endpoint and an access-token endpoint, while 2.0 has an authorization endpoint and a token endpoint. RFC 6749 acknowledges this and says the two versions “may co-exist on the network”, which is how real migrations happen.

A move off OAuth 1.0 usually runs in this order:

  1. Stand up an OAuth 2.0 authorization server next to the old 1.0 endpoints, and register each client in it with the right grant type (authorization code with PKCE for apps that have users, client credentials for services).
  2. Teach each API to accept both for a while: verify 1.0 signatures on requests that carry them, and validate 2.0 bearer tokens on the rest.
  3. Move users without forcing a new consent where the provider allows it. X, for example, tells developers they can “convert their stored access tokens to OAuth 2.0 tokens without asking them to re-authorize” (X developer docs). Otherwise, ask users to reconnect the next time they sign in.
  4. Watch the traffic on the 1.0 endpoints, and switch them off once it reaches zero.

Where OAuth 1.0 still survives

OAuth 1.0a is not gone. The X developer platform still says that “many endpoints on the X developer platform use the OAuth 1.0a method to act, or make API requests, on behalf of a X account” (X developer docs), next to its OAuth 2.0 option. You will also meet it in older partner and e-commerce APIs that were built before 2012. Supporting it as a client of someone else’s API is fine; there is no reason to choose it for a new authorization server you run yourself.

What OAuth 2.1 changes, and why it is where you should land

OAuth 2.0 is a framework with many optional parts, and over a decade the community learned which of those parts were unsafe. RFC 9700, published in January 2025 as Best Current Practice 240, records those lessons and updates RFC 6749 and RFC 6750. OAuth 2.1 goes a step further and folds 2.0, PKCE, the bearer token spec and that security guidance into one document. It is still an IETF draft (draft-ietf-oauth-v2-1), but its rules are already the ones RFC 9700 asks you to follow, so building to them today costs you nothing later. We go deeper on the draft in OAuth 2.1: what changed and how Keycloak implements it.

The implicit and password grants are removed

The implicit grant returned an access token directly in the browser’s redirect URL, where it could leak through browser history, logs and referrer headers. The resource owner password credentials grant (Keycloak calls it direct access grants) has the app collect the user’s password itself, which is the exact thing OAuth was invented to avoid. RFC 9700 says that “clients SHOULD NOT use the implicit grant” (RFC 9700, section 2.1.2) and that the resource owner password credentials grant “MUST NOT be used” (RFC 9700, section 2.4), and OAuth 2.1 omits both from the specification (oauth.net/2.1). Single-page apps and mobile apps use the authorization code grant with PKCE instead.

PKCE is required for every client using the authorization code flow

PKCE (Proof Key for Code Exchange, RFC 7636) has the client create a random secret for each login, send a hash of it with the authorization request, and send the secret itself when it exchanges the code for tokens. An attacker who intercepts the authorization code cannot redeem it without that secret. RFC 9700 says “Public clients MUST use PKCE” and that for confidential clients it “is RECOMMENDED” (RFC 9700, section 2.1.1), and OAuth 2.1 makes it required for all clients that use the authorization code flow (oauth.net/2.1). Our step-by-step guide shows how to create a PKCE authorization flow client in Keycloak.

OAuth 2.1 also tightens a few smaller rules, as listed at oauth.net/2.1: redirect URIs must be compared by exact string match, bearer tokens may no longer be sent in a URL query string, and refresh tokens for public clients must be either sender-constrained or rotated (replaced with a new one on every use, so a stolen copy is detected when the old one comes back).

Bearer tokens and sender-constrained tokens

OAuth 2.0 traded OAuth 1.0’s signatures for simplicity, and sender-constrained tokens bring back proof of possession without bringing back the pain of signing every parameter. A sender-constrained token is bound to a key the client holds, so the resource server rejects it if someone else presents it. RFC 9700 says authorization and resource servers “SHOULD use mechanisms for sender-constraining access tokens” (RFC 9700, section 2.2.1), and names two standard mechanisms:

  • Mutual TLS (RFC 8705) binds the token to the client’s TLS certificate. It suits service-to-service traffic where you already manage client certificates.
  • DPoP (RFC 9449) has the client sign a small proof with its own key on each request and binds the token to that key. It works at the application layer, so browsers and mobile apps can use it without client certificates. Our post on DPoP with the Keycloak Admin API using Node.js shows the full exchange.

If you want a broader view of when a token-based protocol is worth it at all, our comparison of API keys and OAuth covers that decision.

Identity management as a service, on open source

Skycloak is a managed identity platform in the same category as Auth0 or Okta, built on real upstream Keycloak. You get SSO, MFA, SCIM and audit logs without running the servers, and you can export and self-host whenever you want.

OAuth 2.0 vs OpenID Connect in one paragraph

OAuth in every version is about authorization: it gives an app an access token to call an API, and it says nothing standard about who the user is. OpenID Connect is a layer on top of OAuth 2.0 that adds an ID token, a signed statement of who signed in and when, plus a userinfo endpoint, so the same flows can be used for login. If you are using OAuth to sign users in, you are almost certainly using OpenID Connect, and our beginner’s guide to OAuth and SSO explains how the pieces fit together.

A modern OAuth 2.0 setup in Keycloak

Keycloak is an OAuth 2.0 and OpenID Connect authorization server, and its client settings map directly onto the OAuth 2.1 rules above. For a single-page or mobile app, a client that follows them looks like this in the Keycloak admin console. These steps follow the Server Administration Guide for Keycloak 26.8.2, where client policies and DPoP are both listed as supported features that are enabled by default, not preview features (Keycloak docs: enabling and disabling features). Older releases may show different labels.

  1. Create a public client. Open Clients, choose Create client, and leave Client authentication off, which makes it a public client that holds no secret (Keycloak docs: capability config).
  2. Allow only the authorization code flow. Keep Standard flow on, and turn Implicit flow and Direct access grants off, which disables the two grants OAuth 2.1 removes (Keycloak docs: capability config). Keycloak’s own guidance, citing RFC 9700, says the implicit flow “SHOULD NOT be used” (Keycloak docs: Implicit) and the password grant “MUST NOT be used” (Keycloak docs: Resource Owner Password Credentials).
  3. Require PKCE. In the same Capability config settings, set PKCE method to S256, which makes PKCE with the S256 challenge method required for this client rather than optional (Keycloak docs: capability config).
  4. Enforce it across the realm. Keycloak ships client profiles named oauth-2-1-for-confidential-client and oauth-2-1-for-public-client that you can attach to clients through a client policy, so new clients are checked against the same rules (Keycloak docs: OAuth 2.1 client profiles, Keycloak docs: OAuth 2.1 compliance).
  5. Bind tokens to a key where you can. For clients that can sign DPoP proofs, turn on Require DPoP bound tokens in the client’s Capability config settings (Keycloak docs: capability config), which binds the access and refresh tokens to the client’s key pair (Keycloak docs: DPoP, Keycloak guide: securing applications with DPoP).

The authorization request your app then sends carries the PKCE challenge next to the usual parameters:

GET /realms/myrealm/protocol/openid-connect/auth?response_type=code
    &client_id=my-spa
    &redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback
    &scope=openid
    &state=af0ifjsldkj
    &code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuZGJlTSq9w
    &code_challenge_method=S256 HTTP/1.1
Host: auth.example.com

The code challenge in that example is the sample value from RFC 7636, appendix B. Most client libraries generate the verifier and challenge for you, so in your own code this is usually one configuration option.

FAQ

Is OAuth 1.0 more secure than OAuth 2.0?

OAuth 1.0’s signatures protect each request even without TLS, which plain OAuth 2.0 bearer tokens do not. OAuth 2.0 with TLS, PKCE, short-lived tokens and sender-constrained tokens such as DPoP gives you the same proof of possession with far less implementation risk, and it is the version that receives security updates such as RFC 9700.

Can an OAuth 1.0 client talk to an OAuth 2.0 server?

No. RFC 6749, section 1 states that OAuth 2.0 “is not backward compatible with OAuth 1.0”. The request formats and endpoints differ, so a client has to be rewritten, or use a library for the other version, to talk to a server of the other kind.

Is OAuth 2.1 a finished standard?

Not yet. It is an IETF draft (draft-ietf-oauth-v2-1), but its rules match the published best practice in RFC 9700, so an OAuth 2.0 server configured to them is already following current guidance.

What is OAuth 1.0a?

OAuth 1.0a is the June 2009 revision (Revision A) of the original community OAuth Core 1.0 specification. RFC 5849 is based on that revision and addresses the errata reported since, so when people say OAuth 1.0 today they mean the protocol in RFC 5849.

What to do next

If you still depend on an OAuth 1.0 API, keep the signing code in a well-tested library and plan your move to the provider’s OAuth 2.0 option. For anything you build yourself, start on OAuth 2.0 configured to the OAuth 2.1 rules: authorization code with PKCE for every app with users, client credentials for services, no implicit or password grant, rotated refresh tokens, and DPoP or mutual TLS where your clients can support them. If you would rather not run the authorization server yourself, you can set up a standards-compliant OAuth 2.0 server on managed Keycloak with Skycloak.

Identity management as a service, on open source

Skycloak is a managed identity platform in the same category as Auth0 or Okta, built on real upstream Keycloak. You get SSO, MFA, SCIM and audit logs without running the servers, and you can export and self-host whenever you want.

Markaretta Dofour
Written by
Content Writer, Skycloak

Markaretta is Skycloak's content writer. She proposes topics, writes posts and pages for search and AI answers, and watches how they perform. She keeps to the answer first and never uses a number or quote without its source.

© 2026 Skycloak. All Rights Reserved. Design by Yasser SolimanKeycloak™ is a trademark of the Linux Foundation. Skycloak is not affiliated with the Keycloak project.