Ravi Vishwakarma is a dedicated Software Developer with a passion for crafting efficient and innovative solutions. With a keen eye for detail and years of experience, he excels in developing robust software systems that meet client needs. His expertise spans across multiple programming languages and technologies, making him a valuable asset in any software development project.
ICSM Computer
08-Jun-2025OAuth 2.0 defines grant types as different ways a client app can obtain an access token from the authorization server.
Each grant type is suited for different use cases — based on the type of client (web app, SPA, mobile, etc.) and level of trust.
The 4 Main OAuth 2.0 Grant Types
Authorization Code Grant (with PKCE)
Flow:
PKCE (Proof Key for Code Exchange) adds extra security for mobile/SPAs.
Returns:
access_token,refresh_token,id_token(if using OpenID Connect)Client Credentials Grant
Flow:
Example:
Password Grant (Resource Owner Password Credentials)
Flow:
username,password, and client credentials.Use With Caution.
Implicit Grant (Deprecated)
Bonus: Other Specialized Grant Types
Summary Chart
Let me know if you’d like: