Choose the right OAuth Grant Type
How the token will be retrieved?
User Log In
User log in and may consent through an interface.
No User Interaction
No user interaction is needed. The application runs in the background or as a service.
All OAuth 2.0 & OIDC Grant Types
Explore detailed sequence diagrams, HTTP flows, security best practices, and RFC specifications for every OAuth 2.0 and OpenID Connect grant type.
Authorization Code Flow
The foundational OAuth 2.0 flow designed for confidential clients that can safely store credentials on a backend server.
Authorization Code Flow with PKCE
The modern standard login flow recommended for Single Page Apps (SPAs), Mobile apps, and Native clients, mitigating authorization code interception and injection attacks.
Client Credentials Flow
Direct server-to-server authorization for machine-to-machine (M2M) communications, microservices, daemons, and automated jobs without end-user interaction.
Refresh Token Flow
Renew expired access tokens seamlessly in the background without forcing the user to re-authenticate or re-enter credentials.
Device Authorization Flow
Designed for internet-connected devices that either lack a browser or have severely restricted text input, such as Smart TVs, media encoders, IoT devices, and CLI terminals.
Implicit Flow
A legacy browser flow where access tokens were returned directly in the URL hash fragment. Deprecated due to token leakage vulnerabilities; use Authorization Code with PKCE instead.
JWT Profile / Bearer Token Flow
Secure server-to-server authorization using cryptographically signed JSON Web Tokens (assertions) as authorization grants or client authentication credentials.
Resource Owner Password Credentials Flow
Legacy flow where the end-user provides their plaintext username and password directly to the client application. Removed in OAuth 2.1 due to severe security risks.