Skip to content
Ashish.
All posts
Diagram illustrating OAuth 2.0 trust boundaries and token flow in 2026.
6 min readSecurityBackend Developers, Security EngineersFeatured#oauth 2.0#rfc 6749#security#authentication#grant types#backend development

RFC 6749 Revisited: What Still Applies in 2026

An examination of RFC 6749 (OAuth 2.0) in 2026, analyzing which grant types remain relevant and why the implicit flow is deprecated.

By Ashish KumarPart 1 of OAuth 2.0 RFCs Every Engineer Should Read

Part 1 of the OAuth 2.0 RFCs Every Engineer Should Read series.

When OAuth 2.0 was standardized in 2012 via RFC 6749, it was designed primarily for browser-based applications where a trusted backend server could securely store client secrets. Over a decade later, the web has shifted dramatically toward Single Page Applications (SPAs), mobile apps, and serverless architectures where no trusted backend exists. This architectural shift exposed critical flaws in the original specification’s grant types. In 2026, the relevance of RFC 6749 lies not in its original breadth, but in the strict subset of flows that survive modern security audits. The implicit flow is deprecated; the authorization code flow with PKCE is mandatory.

The Architecture of Trust

OAuth 2.0 is an authorization framework, not an authentication protocol. It delegates user authorization to a third-party service and allows applications to obtain limited access to user accounts on an HTTP service. The core actors are:

  1. Resource Owner: The user.
  2. Client: The application requesting access (e.g., a SPA or mobile app).
  3. Authorization Server (AS): Issues access tokens after authenticating the resource owner and obtaining authorization.
  4. Resource Server (RS): Hosts the protected resources and accepts access tokens.

The mechanism relies on the access token as a bearer credential. Possession of the token grants access. The security model assumes that if a token is intercepted, it can be used by anyone who holds it. Therefore, the primary engineering challenge is minimizing the window and vector of exposure during token issuance.

Technical architecture diagram showing four roles : Resource Owner, Client, Authorization Server, and Resource Server. Arrows indicate token flow and authorization delegation. Clean, minimalist style, blue and grey palette, white background, clear labels.

The Implicit Flow’s Fatal Flaw

The implicit flow (grant_type=implicit) was designed for clients that cannot securely store credentials, typically early browser-based apps. In this flow, the AS redirects the user’s browser to the client’s redirect URI with the access token embedded directly in the URL fragment (e.g., https://client.example/callback#access_token=...&token_type=bearer).

This design is fundamentally broken for three reasons:

  1. Token Leakage via History: The access token appears in the browser’s URL bar, browser history, and server logs. Any script running on the page or any extension with access to history can read the token.
  2. No Client Authentication: Since the client is public (no secret), there is no mechanism to verify the client’s identity at the token exchange stage. The token is issued directly to the redirect URI.
  3. Cross-Site Request Forgery (CSRF) Vulnerability: While the state parameter mitigates CSRF on the authorization request, the implicit flow's primary security failure is token exposure in the URL fragment, which state does not prevent.

In OAuth 2.0, the implicit flow is widely considered obsolete. Modern security guidance, such as the OAuth 2.1 draft specification and OWASP recommendations, strongly advises against using the implicit flow and recommends PKCE instead.

The PKCE Mechanism

To address the vulnerabilities of public clients, RFC 7636 introduced Proof Key for Code Exchange (PKCE). PKCE transforms the Authorization Code flow from a secure backend-only mechanism into a secure public-client mechanism.

The mechanism works in four steps:

  1. Code Challenge Generation: The client generates a code_verifier (a high-entropy random string) and derives a code_challenge (typically via SHA-256 hashing and base64url encoding).
  2. Authorization Request: The client sends the code_challenge and code_challenge_method to the AS during the initial authorization request.
  3. Authorization Grant: The AS stores the code_challenge and issues an authorization code to the client via the redirect URI.
  4. Token Exchange: The client sends the authorization code back to the AS along with the original code_verifier. The AS recomputes the challenge from the verifier and compares it to the stored challenge. If they match, the AS issues the access token.

This process prevents authorization code interception attacks. Even if an attacker intercepts the authorization code, they cannot exchange it for an access token without the code_verifier, which never leaves the client’s secure environment. For SPAs and mobile apps, PKCE is now the mandatory security control.

Sequence diagram illustrating the PKCE flow. Four vertical lines : Client, Authorization Server, Resource Server, Browser. Steps : 1. Code Challenge sent to AS. 2. Auth Code returned to Client. 3. Code Verifier sent with Auth Code to AS. 4. Access Token returned. Clean technic…

Current Best Practices for 2026

In 2026, the selection of grant types is dictated by the trust model of the client:

1. Authorization Code Flow with PKCE (Public Clients)

For SPAs, mobile apps, and other clients that cannot securely store a client secret, the Authorization Code flow with PKCE is the only recommended path. It ensures that the token is delivered to the backend (or a secure cookie) rather than exposed in the URL. The client must generate a unique code_verifier for each authorization request to prevent replay attacks.

2. Client Credentials Flow (Confidential Clients)

For machine-to-machine (M2M) communication, where there is no user involved, the Client Credentials flow is appropriate. The client authenticates itself using a client ID and secret (or mutual TLS) and requests an access token for its own behalf. This flow does not involve user interaction or authorization codes.

3. Deprecation of Resource Owner Password Credentials (ROPC)

The ROPC flow (grant_type=password) requires the client to handle the user’s username and password. This is strongly discouraged because it breaks the principle of least privilege, forces the client to trust the user’s password, and prevents users from revoking access to specific applications without changing their global password. It also disables multi-factor authentication (MFA) workflows.

Conclusion

RFC 6749 remains the bedrock of OAuth 2.0, but its application in 2026 requires strict adherence to modern security practices. The implicit flow is a historical artifact that should not be implemented in new systems. Instead, developers must leverage PKCE to secure public clients and reserve confidential client mechanisms for trusted backends. By focusing on these mechanisms, engineers can build authorization systems that are both functional and resilient against common attack vectors.

Related posts