Common Errors

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 Handlingarrow-up-right for code examples.

🎯 How to Use This Guide

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

πŸ” Quick Error Lookup

Error Code
Common Cause
Quick Fix

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

Error: "invalid_request" (Missing Request Parameter)

When it occurs: Authorization endpoint rejects requests without required request parameter

Error Response Format

Symptoms

  • 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

Root Cause

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.

Step-by-Step Solution

Step 1: Identify the problem

Step 2: Understand JAR requirement

Step 3: Implement JAR with request parameter

Step 3: Verify implementation

  • 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

Prevention Tips

  • 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

Alternative for Legacy Applications

If your application cannot implement JAR due to technical constraints, contact [email protected]envelope to discuss enabling traditional OAuth flow as a temporary solution.

Include in your request:

  • Application details and technical constraints

  • Reason why JAR cannot be implemented

  • Security measures you have in place

Error: "invalid_request_object"

When it occurs: JAR token has invalid format or signature

Error Response Format

Symptoms

  • 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

Root Causes

  1. Invalid JWT signature - wrong client secret or private key

  2. Unsupported signing algorithm - must be HS256 or EdDSA

  3. Malformed JWT structure - invalid JWT format

  4. Missing or incorrect Key ID (for EdDSA)

  5. Unregistered public key (for EdDSA)

Step-by-Step Solution

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)

Prevention Tips

  • 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

Error: "invalid_request" (JAR Expired)

When it occurs: JAR token has exceeded its expiration time

Error Response Format

Symptoms

  • Authorization request fails with 400 error

  • Error code: invalid_request

  • Error description mentions JAR expiration

  • JAR was created more than 5 minutes ago

Root Cause

JAR tokens have a maximum lifetime of 5 minutes for security reasons.

Step-by-Step Solution

Step 1: Check JAR expiration

Step 2: Generate fresh JAR

Prevention Tips

  • 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 Endpoint Errors

Error: "invalid_grant"

When it occurs: Authorization code or refresh token is invalid

Error Response Format

Symptoms

  • Token exchange fails with 400 error

  • Error code: invalid_grant

  • Various error descriptions depending on specific issue

Common Scenarios

Scenario 1: Authorization code not found

Scenario 2: Authorization code already used

Scenario 3: Authorization code expired

Scenario 4: PKCE verification failed

Step-by-Step Solution

Step 1: Check authorization code

Step 2: Verify PKCE parameters

Prevention Tips

  • 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

Error: "invalid_client"

When it occurs: Client authentication failed

Error Response Format

Symptoms

  • Token exchange fails with 401 error

  • Error code: invalid_client

  • Client credentials are rejected

Root Causes

  1. Wrong client_id - doesn't match registration

  2. Wrong client_secret - incorrect or missing

  3. Client not found - client_id not registered

  4. Wrong authentication method - using wrong auth method

  5. IP address not whitelisted - for client_credentials grant

  6. Client not confidential - public client attempting client_credentials

Step-by-Step Solution

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)

Prevention Tips

  • 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)

Error: "unauthorized_client"

When it occurs: Client not authorized for the requested grant type

Error Response Format

Symptoms

  • Token exchange fails with 403 error

  • Error code: unauthorized_client

  • Specific to client_credentials grant type

Root Cause

Public clients cannot use the client_credentials grant type - only confidential clients are authorized.

Step-by-Step Solution

Step 1: Check client type

Step 2: Use correct grant type for client type

Step 3: Register confidential client if needed

Prevention Tips

  • 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

Error: "invalid_client" (IP Not Whitelisted)

When it occurs: Client credentials grant from non-whitelisted IP address

Error Response Format

Symptoms

  • Client credentials grant fails with 401 error

  • Error code: invalid_client

  • Error description mentions specific IP address

  • Valid client credentials but request rejected

Root Cause

Oten IDP implements IP address validation for client credentials grant when IP whitelist is configured for enhanced security.

Step-by-Step Solution

Step 1: Check your current IP address

Step 2: Verify IP whitelist configuration

Step 3: Test from whitelisted IP

Prevention Tips

  • 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

Security Benefits

  • 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

Error: "access_denied"

When it occurs: User denied authorization on consent screen

Error Response Format

Symptoms

  • User gets redirected to callback with error

  • Error code: access_denied

  • User clicked "Deny" or "Cancel" on consent screen

Root Cause

This is normal user behavior - user chose not to grant access to your application.

Step-by-Step Solution

Step 1: Handle gracefully

Step 2: Provide clear messaging

Prevention Tips

  • 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

🌐 Network and Configuration Errors

Error: "server_error"

When it occurs: Internal server error on Oten IDP

Error Response Format

Authorization Endpoint:

Token Endpoint:

Symptoms

  • Intermittent failures

  • Error code: server_error

  • Usually temporary issues

Step-by-Step Solution

Step 1: Implement retry logic

Step 2: Check Oten status

Prevention Tips

  • Implement retry logic with exponential backoff

  • Monitor Oten status page

  • Set appropriate timeouts

  • Log errors for investigation

πŸ”§ Quick Debugging Checklist

Authorization Endpoint Issues

Token Endpoint Issues

Network Issues

πŸ“š Additional Resources


Need Help? Contact Oten support at [email protected]envelope

Last updated