Step 1: Choose OAuth Library
Last updated
Last updated
The first step in integrating Oten IDP is selecting the right OAuth 2.0 / OpenID Connect library for your technology stack. IMPORTANT: Your chosen library must support JAR (JWT-Secured Authorization Request) as Oten IDP requires it for all authorization requests.
Can't implement JAR? If your application cannot support JAR due to technical constraints, contact support@oten.dev to discuss enabling traditional OAuth flow as a temporary solution.
📖 Need the big picture? Check out the Integration Flow Overview to understand how this step fits into the complete process.
In this step, you will:
Understand JAR (JWT-Secured Authorization Request) requirements
Choose libraries that support JAR and JWT signing
Install and configure your chosen library with JAR support
Understand the trade-offs between different options
Oten IDP requires JAR (JWT-Secured Authorization Request) for ALL authorization requests. Your chosen library must support:
✅ JWT Creation and Signing (RS256, HS256, or EdDSA)
✅ Custom JWT Claims (ability to add OAuth parameters to JWT payload)
✅ Key Management (RSA keys for RS256 or client secret for HS256)
✅ Request Parameter Support (sending JWT in request parameter)
Libraries that only support traditional OAuth query parameters will NOT work with Oten IDP:
Libraries that can create signed JWTs and send them in the request parameter:
openid-client - Most comprehensive
oidc-client-ts - Standards compliant
Authlib - Modern and comprehensive
Spring Security OAuth2
OpenID Connect Authentication
League OAuth2 Client
Oten go-oauth - Official library with JAR support
Manual JAR Implementation with Standard Library
Recommendation: Use the Oten go-oauth library as it handles all JAR complexity automatically and is specifically designed for Oten IDP.
The Oten go-oauth library provides comprehensive OAuth 2.0 and OpenID Connect support with built-in JAR functionality:
Installation:
Key Components:
Complete Example:
Advanced Features:
OmniAuth
MUST HAVE features for Oten IDP integration:
Look for libraries that support:
Ensure the library supports:
Preferred libraries should support:
Consider:
Set up your configuration securely:
Most libraries need to be configured for JAR support:
Since Oten IDP requires JAR, you'll need additional setup:
Progress: Step 1 of 5 complete ✅
Maintained by platform vendors (Google, Microsoft, etc.)
Well-documented and supported
Regular security updates
Best practices built-in
May need custom JAR implementation
Community-maintained
Often more flexible
May have additional features
Varying quality and support levels
Check JAR support before choosing
Specifically designed for Oten IDP
Built-in JAR support
Optimized for Oten features
Direct support from Oten team
Can securely store client secrets
Token exchange happens on server
More security options available
Examples: Web servers, APIs, backend services
Cannot store secrets securely
Must use PKCE for security
Tokens handled in browser/device
Examples: SPAs, mobile apps, desktop apps
✅ Built-in JAR Support: Automatically creates and signs JWT authorization requests
✅ Multiple Signing Methods: Supports RS256 (RSA) and HS256 (HMAC) algorithms
✅ PKCE Integration: Automatic PKCE generation for public clients
✅ Token Management: Built-in token refresh and validation
✅ JWKS Support: Automatic public key publishing
✅ Oten Optimized: Designed specifically for Oten IDP features
client package: Main OAuth client with JAR support
jar package: JWT-Secured Authorization Request implementation
token package: Token management and validation
jwks package: JSON Web Key Set handling
✅ JWT Creation and Signing (RS256, HS256, or EdDSA algorithms)
✅ Custom JWT Claims (ability to embed OAuth parameters in JWT payload)
✅ Request Parameter Support (sending JWT in request parameter)
✅ Key Management (RSA private keys or client secrets)
✅ JWKS Integration (for public key distribution)
JAR (JWT-Secured Authorization Request) - REQUIRED for Oten
PKCE (essential for public clients)
State parameter validation (CSRF protection)
Nonce support (replay attack prevention)
JWT validation (signature verification)
Token refresh (automatic renewal)
JAR RFC 9101 - CRITICAL for Oten IDP
OAuth 2.0 RFC 6749
OpenID Connect Core 1.0
PKCE RFC 7636 (for public clients)
JWT RFC 7519
JWKS RFC 7517 (for key distribution)
Oten endpoints (pre-configured)
Multi-tenant workspace selection
Oten specific scopes
Built-in error handling for Oten responses
Active development (recent commits)
Security updates (vulnerability patches)
Documentation quality
Community support
Issue response time
Oten compatibility (if available)
Install the library
Set up JAR configuration (private key, JWKS endpoint)
Create a simple JAR authorization request
Test the JWT creation and signing
Verify the authorization URL format
Test the complete OAuth flow
← Previous: JAR Requirement - Understanding JAR requirements
↑ Overview: Integration Flow Overview - See the big picture
→ Next: Step 2: Configure OAuth Client - Set up your OAuth client