Join our Newsletter — 33% off our NHI Course
Home› Guides› OAuth Grant Types Reference: Each Grant, Its Status…
Guide Authentication

OAuth Grant Types Reference: Each Grant, Its Status and When to Avoid It

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

Teams still pick OAuth grants by copying whatever an old tutorial used, so password and implicit flows survive long after the standards dropped them. This reference lists every OAuth grant in common use, the specification that defines it, its position in the OAuth 2.0 Security Best Current Practice (RFC 9700) and in the OAuth 2.1 draft, and the situations where you should not use it. It is written for developers, identity architects and authorisation server owners who need to approve, review or retire client registrations. Status statements were checked on 27 November 2026: OAuth 2.1 is still an Internet-Draft (draft-ietf-oauth-v2-1-17, dated 31 October 2026), so treat its contents as likely direction, not a published standard.

Key takeaways

  • Authorisation code with PKCE is the default for users. RFC 9700 requires PKCE for public clients and recommends it for confidential ones, and OAuth 2.1 builds the code grant around it.
  • Client credentials is the grant for non-human identities. Pair it with asymmetric client authentication (private_key_jwt or mutual TLS), narrow scopes and short token lifetimes instead of long-lived shared secrets.
  • Device authorisation is useful and phishable. RFC 8628 itself warns about remote phishing, and device code phishing has been used in real campaigns; block it where it is not needed.
  • Implicit and password grants are retired. RFC 9700 says clients SHOULD NOT use the implicit grant and the password grant MUST NOT be used; neither appears in the OAuth 2.1 draft.
  • Extension grants need their own controls. Token exchange, JWT bearer and CIBA solve real problems but each needs client authentication, audience restriction and an owner who understands the trust it creates.

How to read this reference

A grant type is the method a client uses to obtain an access token from the token endpoint. RFC 6749 (2012) defined four grants and an extension mechanism: authorisation code, implicit, resource owner password credentials and client credentials, plus the refresh token grant used to renew tokens. Later RFCs and OpenID Foundation specifications added extension grants identified by URNs in the grant_type parameter.

  • Specification: the document that defines the grant. RFCs are published standards; the OAuth 2.1 draft can still change.
  • RFC 9700 position: the security BCP published in January 2025 as BCP 240. It updates RFC 6749 and is the current consolidated advice. See the OAuth 2.0 Security Best Current Practice (RFC 9700) Guide.
  • OAuth 2.1 draft position: Section 1.3 of draft 17 defines three grants (authorisation code, refresh token and client credentials). Other grants are extensions. See the OAuth 2.1, GNAP and FAPI Guide.
  • Avoid when: conditions under which the grant is the wrong choice even if the specification allows it.

Grant types at a glance

Grantgrant_type valueSpecificationRFC 9700 / OAuth 2.1 draftTypical useAvoid when
Authorisation code (with PKCE)authorization_codeRFC 6749 s4.1, PKCE RFC 7636Recommended; PKCE MUST for public clients / core grantWeb, single-page, native and mobile apps acting for a userNo user is present (use client credentials)
Refresh tokenrefresh_tokenRFC 6749 s6Public client refresh tokens MUST be sender-constrained or rotated / core grantRenewing access without a new user interactionLong-lived bearer refresh tokens on public clients
Client credentialsclient_credentialsRFC 6749 s4.4Allowed; asymmetric client authentication recommended / core grantService to service, jobs, workloads, agents acting as themselvesThe call is on behalf of a user
Device authorisationurn:ietf:params:oauth:grant-type:device_codeRFC 8628Not a BCP topic beyond CSP on the device endpoint / extensionTVs, CLIs, input-constrained devicesThe device has a browser, or the flow is not needed at all
Token exchangeurn:ietf:params:oauth:grant-type:token-exchangeRFC 8693Allowed / extensionDelegation and impersonation across services, downscopingUsed as a general token converter without policy
JWT bearerurn:ietf:params:oauth:grant-type:jwt-bearerRFC 7523Allowed / extensionTrusted issuer asserts a subject, server-side integrationsThe assertion issuer is not tightly controlled
SAML 2.0 bearerurn:ietf:params:oauth:grant-type:saml2-bearerRFC 7522Allowed / extensionBridging SAML federations to OAuth APIsNew builds that can use OIDC and JWT
CIBAurn:openid:params:grant-type:cibaOpenID CIBA Core 1.0 (Final)Not covered / extensionCall centre, point of sale, decoupled approvalNo binding message can be shown to the user
Implicitnone (response_type=token)RFC 6749 s4.2SHOULD NOT be used / removedLegacy single-page appsAlways, for new work
Resource owner password credentialspasswordRFC 6749 s4.3MUST NOT be used / not specifiedLegacy first-party appsAlways

Authorisation code with PKCE

The client sends the user's browser to the authorisation endpoint, receives a short-lived code at a registered redirect URI and exchanges it at the token endpoint. PKCE (RFC 7636) binds the code to the client instance: the client sends a code_challenge derived from a secret code_verifier and proves possession of the verifier at redemption.

  • Requirements from RFC 9700 Section 2.1.1: public clients MUST use PKCE, confidential clients SHOULD, authorisation servers MUST support it, MUST enforce the verifier when a challenge was sent and MUST mitigate PKCE downgrade. Use S256; it is the only method that does not expose the verifier.
  • Redirect URIs: exact string matching, no wildcards, and no plain http except loopback redirects for native apps.
  • Client type: single-page apps are public clients. Where tokens should not reach the browser, use a backend for frontend. See the OAuth for Browser-Based Applications and the BFF Pattern Guide and the OAuth for Native and Mobile Apps Guide.
  • Avoid when: there is no user, or the client cannot open a browser or receive a redirect (consider device authorisation, with care).

The refresh token grant sits alongside the code grant. RFC 9700 Section 2.2.2 says refresh tokens for public clients MUST be sender-constrained or use refresh token rotation. See the OAuth Refresh Token Rotation and Expiry Guide and the DPoP Guide.

Client credentials

The client authenticates as itself and receives a token that represents the client, not a user. This is the main OAuth path for non-human identities: microservices, batch jobs, CI pipelines, integration platforms and AI agents that act under their own identity. See the Machine-to-Machine OAuth (Client Credentials) Guide.

DecisionWeaker choiceStronger choice
Client authenticationclient_secret_basic or client_secret_post with a shared secretprivate_key_jwt (RFC 7523) or mutual TLS (RFC 8705); RFC 9700 Section 2.5 recommends asymmetric methods
Credential sourceSecret in a config file or environment variableWorkload identity federation or a platform-issued assertion, with no stored secret
Token bindingBearer access tokenSender-constrained token (mTLS or DPoP, RFC 9449)
ScopeOne client with broad scopes for many jobsOne client per workload, minimal scopes, audience-restricted tokens
LifetimeHour-long or longer tokens, secrets never rotatedShort token lifetimes, key rotation on a schedule with overlap
  • Subject confusion: RFC 9700 describes a client impersonating a resource owner. If a client can choose its own client_id and that value can collide with a user identifier in the sub claim, a resource server may treat a client token as a user token. Do not let clients choose identifiers in a shared namespace, and give resource servers a way to tell client tokens from user tokens.
  • Ownership: record a human owner, purpose and expiry for each client registration. Orphaned client credentials are standing access nobody reviews.
  • Avoid when: the action is on behalf of a user. Using client credentials to act for users hides who authorised what; use the code grant or token exchange so the user stays in the token.

See the JWT Client Authentication (private_key_jwt) Guide and the Workload Identity Federation Guide.

Device authorisation

RFC 8628 serves devices that cannot run a browser or accept typed input easily. The device posts its client_id to a separate device authorisation endpoint and gets back a device_code, a short user_code, a verification_uri and an expires_in lifetime. The user visits the URI on a phone or laptop and enters the code while the device polls the token endpoint. If no interval is returned, clients must wait 5 seconds between polls, and a slow_down error adds 5 seconds to the interval.

  • Remote phishing (RFC 8628 Section 5.4): an attacker can start the flow on a device they control and persuade a user to enter the code. The RFC recommends telling users they are authorising a device, asking them to confirm it is in their possession and showing device information. A short code lifetime reduces but does not remove the risk, because a real-time phisher can request a fresh code.
  • Brute force (Sections 5.1 and 5.2): rate-limit user code attempts. The RFC's example 8-character base-20 code has about 34.5 bits of entropy. The device code is never shown to users and should have high entropy.
  • Real-world abuse: Microsoft reported in February 2025 that the actor it tracks as Storm-2372 sent meeting invitations leading to genuine Microsoft device code sign-in pages, then used the resulting tokens to search and exfiltrate mail. Microsoft's mitigations included blocking device code flow where possible, revoking refresh tokens on suspected compromise and phishing-resistant MFA. See the Device Code Phishing Guide.
  • Control: in Microsoft Entra ID the Conditional Access "Authentication flows" condition can block device code flow; Microsoft advises auditing use in report-only mode first and allowing it only for documented cases. See How to block device code flow with Conditional Access and handle the exceptions.
  • Avoid when: the client can open a browser (use the code grant with PKCE), or the organisation has no input-constrained devices that need it.

Token exchange, JWT bearer and CIBA

Token exchange (RFC 8693)

A client presents a subject_token, and optionally an actor_token, and asks for a new token for a given audience or resource. RFC 8693 distinguishes impersonation, where the actor becomes indistinguishable from the subject, from delegation, where the token carries both and the act claim names the current actor. Nested act claims record a chain, but access decisions should use only the top-level claims and current actor. The RFC strongly recommends client authentication, because otherwise anyone with a stolen token could exchange it. This grant fits agent and microservice chains that must keep the user in context. See the OAuth Token Exchange and Delegation Guide.

JWT bearer (RFC 7523)

The client posts a signed JWT in the assertion parameter. The JWT must carry iss, sub, aud and exp; jti is optional, so replay protection is the server's choice. RFC 7523 also defines client authentication with client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer, which is the basis of private_key_jwt. Do not confuse the two: the grant asserts a subject, the client assertion authenticates the client. Restrict which issuers are trusted and which subjects each issuer may assert, and track jti to stop replay.

CIBA (OpenID Foundation, Final)

Client Initiated Backchannel Authentication lets a client on one device ask the provider to authenticate a user on another, such as a banking app approving a call centre transaction. The client sends exactly one of login_hint_token, id_token_hint or login_hint and may send a binding_message shown on both devices. Tokens arrive by poll, ping or push mode, chosen at registration. Push mode bypasses the client-authenticated token endpoint, so the notification endpoint needs strong protection. See the OIDC CIBA Guide and CIBA vs OAuth Device Flow.

Deprecated grants: implicit and password

GrantWhy it was retiredReplacementHow to find it
ImplicitAccess tokens returned in the front channel leak through browser history, referrers and logs, and can be injected; no client authentication or sender bindingAuthorisation code with PKCE, or a BFFRegistrations allowing response_type=token or id_token token; authorisation logs with those response types
Resource owner password credentialsThe client handles the user's password, which trains phishing behaviour, blocks MFA and federation, and gives the client the full credentialAuthorisation code with PKCE for users; client credentials for servicesToken endpoint requests with grant_type=password; clients configured to permit it

RFC 9700 says clients SHOULD NOT use the implicit grant unless token injection is prevented and leakage is mitigated, and that the password grant MUST NOT be used. The OAuth 2.1 draft removes implicit and does not specify password. Migration steps are in the OAuth Implicit Flow Migration guide.

Monitoring grant use

  • Grant mix: count token requests by grant_type and client each week; any password or implicit traffic is a finding.
  • Device code use: alert on device code sign-ins from users or apps with no approved need, which is a sign of phishing.
  • Client authentication method: percentage of confidential clients using private_key_jwt or mTLS rather than secrets.
  • Token theft signals: token use from a new location or client shortly after issuance maps to MITRE ATT&CK T1528 Steal Application Access Token and T1550.001 Application Access Token.
  • Orphaned clients: client registrations with no owner or no token requests in 90 days.

Framework mapping

FrameworkReferenceRelevance
NIST CSF 2.0PR.AA-01, PR.AA-05Credentials for users and services are managed; permissions follow least privilege
NIST SP 800-53 Rev 5IA-5, IA-9, AC-6Authenticator management for client secrets and keys; service authentication; least privilege scopes
MITRE ATT&CKT1528, T1550.001, T1566.002Token theft, use of stolen tokens, and phishing links used for device code phishing

Practitioner checklist

  • Inventory every client registration with its allowed grant types, client type, authentication method and owner.
  • Disable the password grant and implicit response types on the authorisation server, after confirming no live traffic in logs.
  • Require PKCE with S256 for all clients using the code grant and reject requests that downgrade it.
  • Move confidential and machine clients from shared secrets to private_key_jwt, mutual TLS or workload identity federation.
  • Give each workload or agent its own client with minimal scopes and audience-restricted, short-lived tokens.
  • Block device code flow by default and allow it only for named, documented use cases.
  • Require client authentication for token exchange and JWT bearer, and define which subjects and audiences each client may request.
  • Sender-constrain or rotate refresh tokens for public clients.
  • Recheck the OAuth 2.1 draft status at each annual review and update this mapping when it is published.

Standards and references

Related NHI Mgmt Group resources: OAuth 2.0 Security Best Current Practice (RFC 9700) Guide · Machine-to-Machine OAuth (Client Credentials) Guide · Device Code Phishing Guide · Authorisation Code vs Client Credentials Flow

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.