Detailed Authentication Steps
For Web Applications (Authorization Code Flow)
- Get Authorization Code - Redirect users to authorization page
- Exchange for Access Token - Exchange the code for tokens
- Make API Requests - Use JWT access token to authenticate requests
- Refresh Token - Get new access tokens when old ones expire
For Machine-to-Machine APIs (Client Credentials Flow)
- Get Access Token Directly - Request tokens using client credentials
- Make API Requests - Use JWT access token to authenticate requests
- Doesn’t require user interaction
- Skips the authorization code step
- Provides direct access token generation
Token Lifecycle Management
- Access tokens expire after 24 hours
- Refresh tokens can be used to obtain new access tokens
- Store tokens securely in your server-side application
- For security reasons, refresh tokens are rotated with each use