The Resource Owner Password Credentials Grant: OAuth's Retired Shortcut
There's one OAuth 2.0 flow that breaks the protocol's most famous promise — "never hand your password to a third-party app" — on purpose. This guide explains exactly what the Password Grant is, why it existed, why almost every security expert now tells you to avoid it, and what to use instead.
Imagine a friend asks you to grab something from their apartment while they’re at work, so they just hand you their actual house key and their alarm code, instead of leaving a spare key with a neighbor. It works, but now that friend has to trust you with everything — not just the one drawer you needed to open. The Resource Owner Password Credentials Grant, often shortened to the “Password Grant,” is exactly this shortcut, built directly into the OAuth 2.0 specification back in 2012 for situations where redirects and browsers simply weren’t practical yet. It has since become the protocol’s most cautionary tale — a flow the industry now actively steers people away from.
1Core Concepts
What is the Resource Owner Password Credentials Grant?
The Resource Owner Password Credentials (ROPC) Grant is an OAuth 2.0 flow where the user types their actual username and password directly into the client application, and that application then sends those raw credentials straight to the Authorization Server in exchange for an access token. Every other major OAuth 2.0 flow avoids this — the entire point of OAuth was to stop apps from ever seeing a user’s real password. ROPC was the one deliberate exception, included in the original 2012 specification as a pragmatic bridge for a specific, narrow situation.
Why it was created in the first place
In 2012, when OAuth 2.0 was finalized, many applications weren’t browser-based at all — command-line tools, older desktop software, and certain trusted first-party mobile apps had no easy way to pop open a browser, redirect the user to a login page, and redirect back. ROPC gave these “credential-trusted” applications a way to still participate in the OAuth ecosystem: skip the redirect dance entirely, and just ask for the password directly, the same way apps always had before OAuth existed.
Most OAuth flows are like a hotel concierge desk: you never hand your ID to the housekeeping staff — the front desk verifies you once and issues a keycard. The Password Grant is like skipping the front desk and handing your government ID directly to the housekeeper cleaning your room, just because it was faster that one time. It works, but it defeats the entire reason the front desk existed.
First-party only
Only ever appropriate for applications the user already fully trusts, built by the same organization as the service.
Deprecated
Formally marked “not recommended” and removed from the updated OAuth 2.0 security guidance.
Authorization Code + PKCE
The modern, redirect-based flow now recommended for essentially all client types.
2Architecture & Components
- Resource Owner: The user, whose actual username and password are typed directly into the client application.
- Client: The application collecting the credentials — critically, this must be a highly trusted, typically first-party application.
- Authorization Server: Receives the raw credentials over a direct, secure back-channel connection and, if valid, issues an access token (and often a refresh token).
- Resource Server: The API that later accepts the issued access token, exactly as in any other OAuth flow.
Notice what’s missing compared to other flows: there is no redirect, no browser involvement, and no separate login page hosted by the Authorization Server. The client application itself is the one presenting the login form, which is precisely the design decision that makes this grant so risky.
graph LR
U["User"] -->|1 Types username and password directly into| CLIENT["Client Application"]
CLIENT -->|2 Sends credentials over back-channel| AUTH["Authorization Server"]
AUTH -->|3 Validates credentials| AUTH
AUTH -->|4 Issues access token, optional refresh token| CLIENT
CLIENT -->|5 Uses access token| API["Resource Server"]
3Internal Working
Step-by-step mechanics
- The client application displays its own login form, asking for a username and password.
- The user types their real credentials directly into that form.
- The client sends those credentials, along with its own client identifier and secret, directly to the Authorization Server’s token endpoint over a single back-channel request.
- The Authorization Server validates the credentials exactly as it would during a normal login.
- If valid, the Authorization Server responds with an access token, and typically a refresh token, in a single step — with no redirect ever taking place.
Compare this to the Authorization Code Flow, where the Authorization Server itself always collects the password on its own login page, and the client application never sees it at all. That single architectural difference is the entire reason this grant exists as a separate, cautionary category.
A fast way to identify this flow in documentation: if a token request includes a raw username and password field sent directly by the client, you’re looking at the Password Grant — every other standard flow keeps those fields away from the client entirely.
4Data Flow & Lifecycle
- Collection: The client momentarily holds the user’s plaintext password in memory, just long enough to send it onward.
- Transmission: Credentials travel once, over TLS, directly to the Authorization Server’s token endpoint.
- Issuance: An access token (short-lived) and often a refresh token (longer-lived) are returned in a single response.
- Usage: The access token is attached to subsequent API calls, exactly like in any other flow.
- Refresh: The refresh token allows getting new access tokens later without asking for the password again.
- Expiration and Revocation: Tokens still expire and can still be revoked, but the original moment of password exposure already happened and cannot be undone.
The key lifecycle insight is this: even though the resulting access token behaves identically to one issued by a safer flow, the moment of credential exposure — the client application briefly holding the real password — is a permanent architectural weak point that no amount of careful token handling afterward can undo.
5Advantages, Disadvantages & Trade-offs
Advantages (Historical)
- No browser or redirect capability required at all
- Simple to implement for command-line tools and legacy desktop clients
- Familiar to users accustomed to typing credentials directly into an app
- Useful for legacy system migrations where redirect-based flows weren’t yet supported
Disadvantages / Trade-offs
- Completely defeats OAuth’s core promise of never exposing passwords to third-party apps
- Impossible to support multi-factor authentication cleanly within this flow
- Cannot support federated logins (Google, corporate SSO) at all — there’s no redirect to hand off to another Identity Provider
- Requires the client application to be trusted with the same level of scrutiny as the identity system itself
- Formally deprecated in modern OAuth 2.0 security guidance
| Dimension | Password Grant | Authorization Code + PKCE |
|---|---|---|
| Client sees raw password | Yes | Never |
| Supports MFA cleanly | No | Yes |
| Supports federated/social login | No | Yes |
| Current recommendation | Deprecated | Recommended default |
6Security
Why this grant is considered dangerous
- Full credential exposure: The client application receives the user’s actual password in plaintext, even briefly. If that application is later found to be malicious, compromised, or simply careless with memory handling and logging, the password itself — not just a token — is at risk.
- No phishing resistance: Because the login form lives inside the client app rather than the Authorization Server’s own trusted domain, users lose the ability to verify they’re really typing their password into the legitimate identity provider’s page.
- Incompatible with modern MFA: Multi-factor authentication challenges (like a push notification or one-time code) are difficult or impossible to weave cleanly into a single-request credential exchange.
- Encourages credential reuse patterns: Training users to type their password into many different applications directly re-normalizes exactly the risky behavior OAuth was invented to eliminate.
The OAuth 2.0 Security Best Current Practice guidance explicitly states that the Resource Owner Password Credentials Grant should not be used, and it has been removed entirely from the newer OAuth 2.1 draft specification. Any new system design today should treat this grant as unavailable.
If it must be used at all
In rare, tightly controlled legacy scenarios — for example, a company migrating its own first-party legacy client gradually — mitigations include restricting the flow strictly to trusted, first-party clients only; requiring the client application itself to be tightly secured and audited; never storing the password beyond the single moment it’s needed; and treating this as a strictly temporary bridge with an active plan to migrate away from it.
7Monitoring, Logging & Metrics
- Grant type usage counts: Track exactly how many token requests still use this grant type, ideally trending toward zero over time.
- Failed authentication attempts via this grant: A useful signal for credential-stuffing attempts, since attackers often prefer this flow precisely because it mimics a normal login form.
- Client identifiers still using this grant: Maintain a clear inventory of exactly which applications still rely on it, so migration efforts can be prioritized and tracked.
- Anomalous request volume: Because this flow resembles a normal login, it’s also an easy target for automated password-guessing scripts — rate-limiting and anomaly detection matter more here than on redirect-based flows.
Deprecation tracking
Dashboard showing which client applications still call this grant, to drive migration planning.
Brute-force detection
Rate limits and anomaly alerts on repeated failed attempts through this endpoint.
8Design Patterns & Anti-patterns
The Problem
Building any new application — mobile, single-page, desktop, or otherwise — around the Resource Owner Password Credentials Grant.
Why It Fails
It exposes the user’s raw password to the client application, blocks clean support for multi-factor authentication and federated login, and has been formally deprecated by the protocol’s own maintainers.
The Fix
Use the Authorization Code Flow with PKCE instead, even for native mobile and desktop applications, using an embedded system browser or secure webview for the login step.
The recommended replacement pattern
- Authorization Code Flow with PKCE: The current universal recommendation, letting the Authorization Server’s own trusted page collect the password, never the client application.
- Device Authorization Grant: For genuinely input-constrained devices (like smart TVs) that can’t easily host a browser, this newer flow lets the user complete login on a separate device instead of typing a password into the constrained one.
- Native app system browser integration: Modern mobile guidance recommends using the operating system’s own secure browser component for login, rather than an in-app credential form.
9Best Practices & Common Mistakes
Best practices
- Treat any existing use of this grant as technical debt with a migration plan, not a permanent architectural choice.
- Never introduce this grant into a brand-new system, regardless of how simple it initially seems.
- If legacy usage is unavoidable temporarily, restrict it strictly to fully trusted, first-party clients and apply aggressive rate limiting.
- Prioritize migrating any client still using this grant toward Authorization Code Flow with PKCE.
- Educate engineering teams on why this grant is deprecated, since its simplicity can make it tempting to reach for out of habit.
Common mistakes teams actually make
Mistake: Choosing it for “simplicity” in a new mobile app
Teams sometimes pick this grant because it avoids implementing a browser-based redirect flow, not realizing they’re trading a one-time implementation cost for a permanent security weakness.
Mistake: Assuming it’s fine because “we own the client app”
Even fully trusted first-party apps benefit from keeping the password away from client code, since app compromise, supply-chain attacks, and logging mistakes remain real risks regardless of ownership.
Mistake: Never revisiting legacy integrations
Systems integrated years ago using this grant are sometimes simply forgotten, quietly persisting as the single weakest link in an otherwise modernized identity architecture.
10Real-World & Industry Examples
Early API Platforms in the Early-to-Mid 2010s
Several major API providers initially offered this grant as a quick option for trusted internal tools and command-line utilities, before redirect-capable libraries and mobile system browsers became widely available and easy to implement.
Legacy Enterprise System Migrations
Some large enterprises migrating older, password-based internal systems toward OAuth 2.0 used this grant as a temporary bridge, allowing existing login screens to keep working unchanged while the backend was gradually modernized.
Modern Identity Platforms Actively Discouraging It
Today, most major identity providers either disable this grant type by default for new applications or display explicit warnings in their documentation, steering developers firmly toward the Authorization Code Flow with PKCE instead.
11Frequently Asked Questions
It remains defined in the original OAuth 2.0 specification (RFC 6749), but current security best practice guidance recommends against using it, and it has been dropped entirely from the newer OAuth 2.1 draft.
Not cleanly. Because it’s a single-request exchange of username and password, there’s no natural place to insert a second authentication step like a push notification or one-time code.
Federated login requires redirecting the user to a separate Identity Provider’s own page. Since this grant has no redirect step at all, there’s no mechanism to hand off authentication to another provider.
Use the Authorization Code Flow with PKCE for essentially all client types today, including native mobile and desktop apps, single-page applications, and traditional server-rendered web apps.
Only in narrow, temporary legacy migration scenarios involving strictly trusted first-party clients, and even then, it should be treated as technical debt with an active plan to remove it.
12Summary and Key Takeaways
Key Takeaways
- The Resource Owner Password Credentials Grant lets a client application collect a user’s raw password directly, bypassing OAuth’s usual redirect-based protection.
- It was introduced in 2012 as a pragmatic option for non-browser-capable clients, not as a recommended everyday flow.
- It cannot cleanly support multi-factor authentication or federated logins, and it formally exposes the user’s password to the client application.
- Modern OAuth 2.0 security guidance recommends against it, and it has been removed from the OAuth 2.1 draft specification entirely.
- The recommended replacement for virtually every use case today is the Authorization Code Flow with PKCE.
- Any remaining legacy usage should be treated as technical debt, tightly restricted, closely monitored, and actively migrated away from.