Short version
Giving the frontend the user’s password is the one thing OAuth was invented to avoid.
Even if the frontend and the backend are both “your code”, doing it anyway
• widens the attack surface,
• breaks phishing-resistant login UX,
• blocks MFA / WebAuthn / step-up auth,
• prevents you from ever separating the auth server from the API, and
• teaches your users the very habit every security team is trying to kill (“type your password wherever an app asks for it”).
Hence RFC 9700 upgrades the old “SHOULD NOT” to a hard “MUST NOT”.
Why it is still a bad idea in a first-party app
-
Extra places the secret can leak
The browser/SPA/native app now sees the clear-text password. It can end up in:
- JS error stacks
- network traces / HAR files
- crash dumps
- mobile analytics SDKs you linked in
- browser extensions
- logs printed by an innocent console.log
With the code-&-PKCE flow the only thing the app ever gets is an opaque, time-limited code. Steal it and you have a few minutes of access, not the master secret.
-
Phishing & look-alikes
System-browser-based flows give users a single, recognizable URL ( login.your-corp.com ) plus the browser’s password manager, passkeys, FIDO tokens, etc.
If the app captures the password itself, a fake app with the same UI can do that too. Users can no longer tell the difference.
-
Modern features don’t fit
ROPC was defined in 2012. MFA, WebAuthn, device binding, conditional access, step-up auth, federated IdPs, risk scoring… none of these can be expressed in “POST /token grant_type=password”.
If you ever want them you must migrate; starting with Auth-Code+PKCE avoids the later re-platforming.
-
Architectural flexibility
The day the company buys another mobile app, launches a partner program, or moves APIs to a different domain, you’ll need a separate auth service.
A clean OAuth/OIDC authorization server already works across all properties; ROPC hard-codes “the backend I’m talking to right now is also the place to sign in”.
-
Compliance & ecosystem support
Large IdPs (Azure AD, Google, Okta, Auth0, AWS Cognito, Ping, Keycloak ≥23) either disable ROPC by default or have it on a deprecation clock.
Security certifications (SOC 2, ISO 27001, PCI-DSS v4) no longer look kindly on flows that hand out passwords to first-party code.
“But we really control both ends…”
Then you don’t need OAuth at all:
• Classic web: POST /login, set an HttpOnly SameSite cookie, be done.
• SPA / mobile: call a non-OAuth “/session” endpoint that returns a JWT or a cookie.
The working group’s point is precisely that path: if what you want is “username+password in, token out”, do it as a proprietary endpoint. The moment you say “I want standards interoperability”, you should also accept the standards’ security bar.
Recommended alternatives
Web apps (same origin as APIs)
• Just keep using session cookies, or
• Authorization Code + PKCE with a server-side /login page.
Single-Page Apps / Native apps
• Authorization Code + PKCE in the system browser tab.
(No client secret required, first-party or not.)
Machine-to-machine
• Client Credentials grant. No user password involved.
Take-away
Resource-Owner-Password grant exists only for historical reasons.
If you design something new in 2024, using it buys you nothing, costs you future options, and weakens your security story—exactly why RFC 9700 stamped it with a “MUST NOT”.