Prerequisites
- An OIDC-compliant identity provider
- Access to configure applications in your IDP
- Your IDP’s OIDC discovery URL or issuer URL
- Access to the Char dashboard
Supported Providers
Custom OIDC integration works with any provider that:- Supports OpenID Connect 1.0
- Publishes a
/.well-known/openid-configurationdiscovery document - Uses RS256, RS384, RS512, ES256, ES384, or ES512 for token signing
- Provides a JWKS endpoint for public key retrieval
Examples of compatible providers include: Keycloak, PingFederate, OneLogin, JumpCloud, Duo, ForgeRock, Cognito, and many others.
SDK References
These generic OIDC libraries work with any compliant identity provider:OIDC Requirements
Your identity provider must support these OIDC features:| Feature | Requirement |
|---|---|
| Discovery document | /.well-known/openid-configuration endpoint |
| JWKS endpoint | Published in discovery document |
| Token signing | RS256, RS384, RS512, ES256, ES384, or ES512 |
| ID tokens | Must include sub, iss, aud, exp claims |
| HTTPS | Issuer URL must use HTTPS |
Configuration Steps
Locate Your Issuer URL
Find your OIDC provider’s issuer URL. This is typically in your IDP’s documentation or settings.Common patterns:
https://idp.yourcompany.comhttps://auth.yourcompany.com/realms/mainhttps://yourcompany.onelogin.com/oidc/2
{issuer}/.well-known/openid-configuration.Verify Discovery Document
Test that your discovery document is accessible:The response should include at minimum:
Create an OIDC Application
In your identity provider, create a new application/client:
- Select OIDC or OpenID Connect as the protocol
- Select Single-Page Application or Public Client as the type
- Configure redirect URIs for your application
- Enable the openid, profile, and email scopes
- Note the Client ID assigned to your application
Configure Char
In the Char Dashboard:
- Navigate to Settings → Integration
- Under SSO Configuration, select Custom OIDC as the provider
- Enter your Client ID from Step 3
- Enter your Issuer URL (e.g.,
https://idp.yourcompany.com) - Click Test Connection to verify
- Click Save Changes
Configuration Reference
| Char Field | Description | Example |
|---|---|---|
| Provider Type | Custom OIDC | custom_oidc |
| Client ID | Your OIDC application’s client ID | char-ai-agent |
| Issuer URL | Full OIDC issuer URL (HTTPS required) | https://idp.yourcompany.com |
Token Requirements
Char validates custom OIDC tokens with these requirements:| Claim | Requirement |
|---|---|
iss | Must exactly match your configured issuer URL |
aud | Must include your configured Client ID |
sub | Required - used as the user identifier |
exp | Must not be expired |
Example: Keycloak Integration
Create a Client in Keycloak
- Go to your Keycloak Admin Console
- Select your realm
- Navigate to Clients → Create
- Configure:
| Setting | Value |
|---|---|
| Client ID | char-ai-agent |
| Client Protocol | openid-connect |
| Access Type | public |
| Valid Redirect URIs | Your app URLs |
| Web Origins | Your app origins |
Example: AWS Cognito Integration
Create a User Pool App Client
- Go to AWS Cognito Console
- Select your User Pool
- Navigate to App integration → App clients
- Create a new app client (public client, no secret)
- Note the Client ID
Example: OneLogin Integration
Create an OIDC Application
- Go to OneLogin Admin Portal
- Navigate to Applications → Add App
- Search for “OpenId Connect” and select it
- Configure:
| Setting | Value |
|---|---|
| Display Name | Char Agent |
| Redirect URI | Your app callback URL |
| Token Endpoint Auth | None (PKCE) |
Troubleshooting
INVALID_ISSUER error
INVALID_ISSUER error
The token’s
iss claim doesn’t match your configured issuer:- Verify the issuer URL exactly matches (including trailing slash if present)
- Check your IDP’s discovery document for the exact issuer value
- Some IDPs include a trailing slash - match it exactly
INVALID_AUDIENCE error
INVALID_AUDIENCE error
The token’s
aud claim doesn’t match:- Verify the Client ID matches your IDP application exactly
- Check if your IDP includes multiple audiences - your Client ID must be one of them
- Ensure you’re using the ID token, not the access token
JWKS_FETCH_FAILED error
JWKS_FETCH_FAILED error
Char couldn’t fetch your IDP’s public keys:
- Verify your issuer URL is correct
- Ensure the
/.well-known/openid-configurationendpoint is accessible - Check that the
jwks_uriin the discovery document is accessible - Test connectivity:
curl {issuer}/.well-known/openid-configuration
INVALID_ALGORITHM error
INVALID_ALGORITHM error
Your IDP is using an unsupported signing algorithm:
- Char supports: RS256, RS384, RS512, ES256, ES384, ES512
- Configure your IDP to use one of these algorithms
- Symmetric algorithms (HS256, etc.) are not supported for security reasons
KEY_NOT_FOUND error
KEY_NOT_FOUND error
The key ID in your token doesn’t match any keys in the JWKS:
- Your IDP may have rotated keys - wait for JWKS cache to refresh (1 hour)
- Check that your IDP’s JWKS endpoint includes the current signing key
- Verify the token is freshly issued, not from a cache
Security Considerations
Additional security best practices:- Use HTTPS for all IDP endpoints (required)
- Keep token lifetimes short (recommended: 1 hour or less)
- Implement token refresh in your application for long sessions
- Validate tokens server-side if additional security is needed
- Monitor authentication logs in your IDP for anomalies
Testing Your Configuration
Use the Test Connection button in the Char dashboard to verify:- The discovery document is accessible
- The issuer URL is valid
- The JWKS endpoint is reachable

