Common Errors
Last updated
Last updated
This guide provides step-by-step solutions for the most frequently encountered errors when integrating with Oten IDP.
📖 Error Reference: See Error Codes Reference for complete error documentation. 📖 Implementation Guide: See OAuth Error Handling for code examples.
Each error includes:
Symptoms and when the error occurs
Root causes and why it happens
Step-by-step solutions to resolve the issue
Prevention tips to avoid the error in the future
Working code examples showing correct implementation
invalid_request
Missing request parameter or JAR expired
invalid_request_object
Invalid JAR signature/format
invalid_grant
Code expired/used/invalid
invalid_client
Wrong credentials or IP not whitelisted
unauthorized_client
Public client using client_credentials
access_denied
User denied access
When it occurs: Authorization endpoint rejects requests without required request parameter
Step 1: Identify the problem
Step 2: Understand JAR requirement
Step 3: Implement JAR with request parameter
Step 3: Verify implementation
Include in your request:
When it occurs: JAR token has invalid format or signature
Step 1: Verify JWT structure
Step 2: Fix HS256 signature issues
Step 3: Fix EdDSA signature issues
Step 4: Validate JAR payload (Confidential Clients Only)
When it occurs: JAR token has exceeded its expiration time
JAR tokens have a maximum lifetime of 5 minutes for security reasons.
Step 1: Check JAR expiration
Step 2: Generate fresh JAR
When it occurs: Authorization code or refresh token is invalid
Scenario 1: Authorization code not found
Scenario 2: Authorization code already used
Scenario 3: Authorization code expired
Scenario 4: PKCE verification failed
Step 1: Check authorization code
Step 2: Verify PKCE parameters
When it occurs: Client authentication failed
Step 1: Verify client credentials
Step 2: Check authentication method
Step 3: Check IP whitelist (for client_credentials grant)
Step 4: Verify client type (for client_credentials grant)
When it occurs: Client not authorized for the requested grant type
Public clients cannot use the client_credentials grant type - only confidential clients are authorized.
Step 1: Check client type
Step 2: Use correct grant type for client type
Step 3: Register confidential client if needed
When it occurs: Client credentials grant from non-whitelisted IP address
Oten IDP implements IP address validation for client credentials grant when IP whitelist is configured for enhanced security.
Step 1: Check your current IP address
Step 2: Verify IP whitelist configuration
Step 3: Test from whitelisted IP
When it occurs: User denied authorization on consent screen
This is normal user behavior - user chose not to grant access to your application.
Step 1: Handle gracefully
Step 2: Provide clear messaging
When it occurs: Internal server error on Oten IDP
Authorization Endpoint:
Token Endpoint:
Step 1: Implement retry logic
Step 2: Check Oten status
Authorization request fails immediately with 400 error
User gets redirected to callback URL with error parameters
Error code: invalid_request
Error description: "Request parameter is required"
Missing request parameter when request_uri not provided
Oten IDP requires either request OR request_uri parameter for all authorization requests (RFC 9101). When neither parameter is provided, you get "Request parameter is required" error.
Check that authorization URL only contains client_id and request parameters
Verify JAR contains all OAuth parameters in JWT payload
Test with a real authorization request
Always include request parameter - it's required for Oten IDP
Include ALL OAuth parameters in JAR payload, not URL
Set appropriate expiration (max 5 minutes)
See JAR Complete Guide for detailed implementation
If your application cannot implement JAR due to technical constraints, contact support@oten.dev to discuss enabling traditional OAuth flow as a temporary solution.
Application details and technical constraints
Reason why JAR cannot be implemented
Security measures you have in place
Authorization request fails with 400 error
User gets redirected to callback URL with error parameters
Error code: invalid_request_object
JAR token is created but rejected by Oten IDP
Invalid JWT signature - wrong client secret or private key
Unsupported signing algorithm - must be HS256 or EdDSA
Malformed JWT structure - invalid JWT format
Missing or incorrect Key ID (for EdDSA)
Unregistered public key (for EdDSA)
Use correct client secret from Oten registration
Only use HS256 or EdDSA algorithms
Include keyid for EdDSA but not for HS256
Validate JAR payload before signing
Test JAR creation with a JWT debugger
Authorization request fails with 400 error
Error code: invalid_request
Error description mentions JAR expiration
JAR was created more than 5 minutes ago
Generate JAR just before use - don't pre-generate
Set expiration to 5 minutes maximum
Don't cache JAR tokens
Implement automatic retry with fresh JAR if expired
Token exchange fails with 400 error
Error code: invalid_grant
Various error descriptions depending on specific issue
Use authorization code immediately after receiving it
Don't reuse authorization codes - they're single-use
Verify PKCE code_verifier matches original code_challenge
Check redirect_uri matches exactly
Handle token exchange errors gracefully
Token exchange fails with 401 error
Error code: invalid_client
Client credentials are rejected
Wrong client_id - doesn't match registration
Wrong client_secret - incorrect or missing
Client not found - client_id not registered
Wrong authentication method - using wrong auth method
IP address not whitelisted - for client_credentials grant
Client not confidential - public client attempting client_credentials
Double-check client credentials from Oten registration
Use client_secret_post authentication method
Store credentials securely in environment variables
Test with curl to verify credentials work
Check IP whitelist for client_credentials grant
Verify client type (confidential vs public)
Token exchange fails with 403 error
Error code: unauthorized_client
Specific to client_credentials grant type
Use correct client type for your use case
Public clients: Use authorization_code with PKCE
Confidential clients: Can use client_credentials for M2M
Check client registration in Oten admin portal
Client credentials grant fails with 401 error
Error code: invalid_client
Error description mentions specific IP address
Valid client credentials but request rejected
Configure IP whitelist in Oten admin portal
Use static IP addresses for production servers
Document whitelisted IPs for your team
Monitor IP changes in your infrastructure
Test from all deployment environments
Prevents unauthorized access even with valid credentials
Provides additional layer of protection for machine-to-machine authentication
Enables detection of credential theft or misuse from unexpected locations
Supports compliance with network security policies
User gets redirected to callback with error
Error code: access_denied
User clicked "Deny" or "Cancel" on consent screen
Explain why you need permissions before redirecting to auth
Request minimal scopes - only what you actually need
Provide clear value proposition to users
Handle denial gracefully - don't show error messages
Intermittent failures
Error code: server_error
Usually temporary issues
Implement retry logic with exponential backoff
Monitor Oten status page
Set appropriate timeouts
Log errors for investigation
Error Codes Reference: Complete error documentation
JAR Implementation Guide: Detailed JAR examples
API Reference: Complete API documentation
Security Best Practices: Security guidelines
Need Help? Contact Oten support at support@oten.dev