SSOGEN / Learn / OAuth Grant Types, by the grant_type Value You Send

Learn

OAuth Grant Types, by the grant_type Value You Send

Every OAuth token request names its grant in the grant_type parameter, and the grant decides how the client proves it may get a token: those are the OAuth grant types. RFC 9700 (January 2025) retired implicit and password.

Overhead view of blank forms fanned into one brass mail slot on a walnut desk; two forms set apart, each crossed through
RFC 9700 (January 2025) retired implicit and password.

The table lists the OAuth grant types in use by the grant_type value the client sends, with the specification and month each comes from. Implicit is the only one with no value: it never calls the token endpoint.

Every grant, by the value you send

Four of the values are URNs. RFC 6749 section 4.5 lets any new grant use an absolute URI as its grant_type, and every grant defined after 2012 does.

grant_type value Grant Defined in Who is present Status
authorization_code Authorization code with PKCE RFC 6749 section 4.1 (October 2012); RFC 7636 (September 2015) A person at a browser Current. PKCE required for public clients (RFC 9700 section 2.1.1)
refresh_token Refresh token RFC 6749 section 6 Nobody new: the client renews earlier access Current. Public clients: sender-constrained or rotating (RFC 9700 section 4.14.2)
client_credentials Client credentials RFC 6749 section 4.4 A program alone Current
urn:ietf:params:oauth:grant-type:device_code Device authorization RFC 8628 section 3.4 (August 2019) A person on a second device Current
urn:ietf:params:oauth:grant-type:token-exchange Token exchange RFC 8693 section 2.1 (January 2020) A service holding another token Current
urn:ietf:params:oauth:grant-type:jwt-bearer JWT bearer RFC 7523 section 2.1 (May 2015) A program holding a trusted JWT Current
urn:openid:params:grant-type:ciba CIBA, an OpenID standard rather than an RFC OpenID CIBA Core 1.0, final September 2021 A person approving on a phone Current
None: response_type=token Implicit RFC 6749 section 4.2 A person at a browser Retired. Should not be used (RFC 9700 section 2.1.2); not in the OAuth 2.1 draft
password Resource owner password credentials (ROPC) RFC 6749 section 4.3 A person typing into the client Retired. Must not be used (RFC 9700 section 2.4); not in the OAuth 2.1 draft

Which OAuth grant type should I use?

Pick the grant from two facts: which type of client you are writing and who is present when it needs a token. A person in a browser means authorization code with PKCE. A program alone means client credentials. A device without a keyboard means the device grant. Refresh tokens extend any session that involves a person.

  • A person in a web, single-page or mobile app: authorization code. Use PKCE with S256 on every client, public or confidential. Each message is shown on the authorization code flow page.
  • A TV, CLI or kiosk without a usable keyboard: device code. The device shows a user code and a URL, and the person approves on a phone.
  • A program with no person behind it: client credentials. The token describes the client itself. RFC 9700 section 2.5 recommends asymmetric client authentication, such as a private key JWT.
  • A session that outlasts its access token: refresh token. The client gets a new access token without a new sign-in. Lifetimes are compared in access token vs refresh token.
  • A service calling another API for the same person: token exchange. The service trades the token it received for one addressed to the next API.
  • A sensitive action the client starts, approved on the person’s phone: CIBA. In poll mode, the client polls the token endpoint until the person decides, with no browser redirect.

One endpoint, different request bodies

Every grant except implicit posts a form to the same token endpoint. Only the parameters change.

Three requests to https://sso.acme.example/oauth2/token
# A program alone, authenticating with a signed assertion
grant_type=client_credentials
&client_id=acme-nightly-report
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=eyJhbGciOiJFUzI1NiIsImtpZCI6ImFjbWUtMSJ9.eyJpc3MiOiJhY21lIn0.k3Vq
&scope=reports.read
# A TV app polling while the person approves elsewhere
grant_type=urn:ietf:params:oauth:grant-type:device_code
&device_code=EXAMPLE-device-code-0000
&client_id=acme-tv
# A single-page app renewing its access token
grant_type=refresh_token
&refresh_token=EXAMPLE-refresh-0000
&client_id=acme-spa
Answers to the device poll before approval
HTTP/1.1 400 Bad Request
{"error":"authorization_pending"}
HTTP/1.1 400 Bad Request
{"error":"slow_down"}

On authorization_pending the device waits the interval from the device authorization response, or 5 seconds if the server sent none. On slow_down it adds 5 seconds to the interval for this and every later poll (RFC 8628 sections 3.2 and 3.5).

Why were the implicit and password grants retired?

Implicit puts the access token in a URL, where it leaks and can be replayed; password hands the person’s credentials to the client and cannot carry multi-factor authentication. RFC 9700 section 2.1.2 says implicit should not be used. Section 2.4 says the password grant must not be used. The OAuth 2.1 draft omits both.

Implicit: the token rides in the redirect. The browser lands on https://app.acme.example/cb#access_token=eyJhbGciOiJSUzI1NiJ9.x7Qa&token_type=Bearer. Browser history and the Referer header can expose it. No standard method binds a token issued this way to the client.

Authorization code with PKCE: only a code rides in the redirect. The browser lands on https://app.acme.example/cb?code=Q3m9vT2kXp. The token comes back in the token response, and only to the client that holds the PKCE verifier. The verifier is explained in what is PKCE.

Password: the client collects the password. The app posts grant_type=password&username=maria.lopez&password=.... Each client becomes one more place where credentials can leak. The grant also has no step where a second factor could run.

Authorization code: the person signs in at the authorization server. The client never sees the password. The server runs whatever the policy asks for, including a second factor or a security key, then returns a code.

JWT bearer: a grant, or client authentication?

RFC 7523 defines both uses of a JWT, and the parameter names tell them apart.

What changed in OAuth 2.1?

OAuth 2.1 folds RFC 6749 and its security updates into one document: it omits the implicit and password grants, makes PKCE part of the authorization code grant and removes the PKCE plain method. It is still an Internet-Draft. The current version is draft-ietf-oauth-v2-1-17, dated October 31, 2026, and expiring May 4, 2027.

  1. October 2012RFC 6749 defines authorization code, implicit, password and client credentials, plus refresh tokens.
  2. May 2015RFC 7523 adds the JWT bearer grant.
  3. September 2015RFC 7636 defines PKCE.
  4. August 2019RFC 8628 adds the device authorization grant.
  5. January 2020RFC 8693 adds token exchange.
  6. September 2021OpenID CIBA Core 1.0 becomes final.
  7. January 2025RFC 9700 (BCP 240) retires implicit and password.
  8. August 2026RFC 10017 joins RFC 8252 in BCP 212 and sets the rules for browser-based applications.
  9. October 31, 2026OAuth 2.1 draft 17 cites RFC 10017 and keeps both retired grants out.

Grants SSOGEN issues

SSOGEN is an OpenID provider and OAuth authorization server. It issues four grants.

Grant Used for Where it is set
Authorization code with PKCE People signing in, with PKCE S256 only and exact redirect URIs; AI agents acting for a person, after a pushed authorization request (PAR) An OpenID Connect application; an AI agent’s redirect URIs
Refresh token A person’s session, by default 30 minutes idle and 8 hours at most. A reused rotated refresh token revokes its whole family The Refresh tokens switch on the application
Client credentials Service applications, with a private key JWT (recommended) or a client secret; AI agents acting alone, with their registered key and DPoP. No refresh token Applications, Register service; AI agent records
CIBA A person approving a sensitive scope at each use; token valid up to 270 seconds Scopes of kind Sensitive in a resource’s scope catalog

The endpoints and the discovery document are on the OpenID Connect provider page.

Questions people ask

What is an OAuth flow?

A flow is the sequence of messages that carries out a grant. The grant is the type of credential the client presents at the token endpoint, such as an authorization code. The flow covers everything around it: the browser redirect, the person signing in, the callback and the token request. People often use the two words for the same thing.

What is the OAuth device flow?

The device flow lets a device without a usable browser or keyboard get a token while the person approves on another device. The device requests a device code and a user code, shows the user code and a URL, then polls the token endpoint with the device_code grant until the person approves (RFC 8628, August 2019).

Is ROPC ever acceptable?

No: RFC 9700 section 2.4 says the resource owner password credentials grant must not be used. It exposes the password to the client and breaks multi-factor sign-in. Move each ROPC client to the authorization code grant with PKCE, or to client credentials when no person is involved, then turn the password grant off at the server.

Sources, all read 2026-11-18: RFC 6749 (sections 4.1 to 4.5, 6), RFC 7523 (sections 2.1, 2.2), RFC 7636, RFC 8628 (sections 3.2, 3.4, 3.5), RFC 8693 (section 2.1), RFC 9700 (sections 2.1.1, 2.1.2, 2.4, 2.5, 4.14.2), OpenID CIBA Core 1.0, draft-ietf-oauth-v2-1-17 (section 10).

Updated