Safeguard
Security Guides•

Why must the OAuth password grant not be used anymore?

RFC 9700 says the resource owner password credentials grant must not be used. It exposes passwords to clients and breaks MFA and passkeys. Alternatives inside.

Safeguard Security Team
3 min read

RFC 9700, the current OAuth security best practice, says the resource owner password credentials grant must not be used. The app collects the user's actual password and sends it to the token endpoint, which widens the attack surface, trains users to type passwords into apps, and cannot work with MFA or passkeys.

What the password grant does

In the password grant, the user types a username and password into the client app. The client sends them to the authorization server and gets tokens back. It looks convenient, especially for first party mobile apps and scripts, and it often appears in tutorials because it needs no redirect.

The problem is that the client now handles the user's real credentials.

The reasons in the RFC

RFC 9700 gives these reasons for the ban:

  • The grant exposes the resource owner's credentials to the client. Even a benign client increases the places where credentials can leak.
  • It trains users to enter their credentials somewhere other than the authorization server.
  • It is not designed for two factor authentication or for sign in processes with several interaction steps.
  • Authentication with cryptographic credentials, such as WebAuthn, may be impossible with it.

That last point matters more each year. As more services move to passkeys, a flow that needs a typed password has nowhere to go.

What to use instead

What you haveUse instead
Web or mobile app with usersAuthorization code flow with PKCE, sign in on the authorization server
Command line tool on a developer machineDevice authorization grant, or code flow with a local redirect
Server job with no userClient credentials grant
Legacy client you cannot change yetPlan a migration, see below

How to migrate a legacy client

  1. Inventory every client that still calls the token endpoint with a password grant. Your authorization server logs should show the grant type per request.
  2. Group them by type: interactive apps, command line tools, and scheduled jobs.
  3. Move interactive apps to the code flow with PKCE. Use the system browser for native apps.
  4. Move jobs to client credentials, with a dedicated client per job.
  5. Turn the password grant off per client once traffic stops, then off globally.
  6. Add an alert if the grant type ever appears again.

Is it ever acceptable

The spec text is a flat must not. Teams sometimes keep it for a migration window, but that should be a dated, owned exception, not a design choice. Where it remains, rate limit and monitor those requests, because the endpoint becomes a password guessing target.

Quick check

Does the password grant work with MFA?

RFC 9700 says it is not designed to work with two factor authentication or multi step sign in.

What replaces it for a command line tool?

The device authorization grant is a common choice, and so is the code flow with a redirect to a local port. Both keep the password on the authorization server.

Safeguard's policies and gates can hold a pull request until your review checks pass, and its SBOM and dependency scanning shows which auth libraries you ship. There is a free scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.