Prerequisites
- An Okta organization (production or preview)
- Admin access to create applications in Okta
- Access to the Char dashboard
Quick Links
Okta Admin Console
Sign in to manage your Okta organization
OAuth 2.0 & OIDC Overview
OAuth 2.0 and OpenID Connect concepts
OIDC API Reference
OpenID Connect API documentation
Build SSO Integration
Single Sign-On integration guide
SDK References
Configuration Steps
Create an OIDC Application in Okta
- Sign in to your Okta Admin Console
- Navigate to Applications → Applications
- Click Create App Integration
- Select OIDC - OpenID Connect as the sign-in method
- Select Single-Page Application as the application type
- Click Next
Configure Application Settings
Configure your new application:
Click Save to create the application.
| Setting | Value |
|---|---|
| App integration name | Char Agent (or your preferred name) |
| Grant type | Authorization Code (with PKCE) |
| Sign-in redirect URIs | Your application’s callback URL |
| Sign-out redirect URIs | Your application’s logout URL |
| Controlled access | Assign to appropriate groups or allow everyone |
Note Your Client ID and Domain
After creating the application:
- Copy the Client ID from the application’s General tab
- Note your Okta domain (e.g.,
acme.okta.comoracme.oktapreview.com)
Configure Char
In the Char Dashboard:
- Navigate to Settings → Integration
- Under SSO Configuration, select Okta as the provider
- Add your Client ID to the Allowed Client IDs list
- Enter your Okta domain (e.g.,
acme.okta.com) - Click Test Connection to verify
- Click Save Changes
Configuration Reference
| Char Field | Okta Value | Example |
|---|---|---|
| Provider Type | Okta | okta |
| Client ID | Application Client ID | 0oa1b2c3d4e5f6g7h8i9 |
| Domain | Your Okta domain | acme.okta.com |
Okta preview environments use
*.oktapreview.com domains. Both production and preview domains are supported.Token Requirements
Char validates Okta tokens with these requirements:| Claim | Requirement |
|---|---|
iss | Must match https://{your-domain} |
aud | Must include your configured Client ID |
sub | Required - used as the user identifier |
exp | Must not be expired |
Example: Obtaining and Passing the Token
Once your Okta application is configured, obtain the ID token after authentication and pass it to the Char agent.- Okta Auth JS
- React (Okta React SDK)
- SSR (Ticket Exchange)
Troubleshooting
INVALID_ISSUER error
INVALID_ISSUER error
Verify your Okta domain is correctly configured:
- Domain should not include
https://prefix - Domain should match exactly (e.g.,
acme.okta.com) - For preview environments, use
*.oktapreview.com
INVALID_AUDIENCE error
INVALID_AUDIENCE error
The token’s
aud claim doesn’t match your configured Client ID:- Ensure the Client ID in Char matches your Okta application exactly
- Verify you’re using the ID token, not the access token
- Check that your Okta application is configured as a Single-Page Application
JWKS_FETCH_FAILED error
JWKS_FETCH_FAILED error
Char couldn’t reach Okta’s JWKS endpoint:
- Verify your Okta domain is correct
- Check that Okta is accessible (not blocked by firewall)
- Use Test Connection in the dashboard to verify connectivity
Token expired immediately
Token expired immediately
If tokens expire quickly:
- Check your Okta application’s token lifetime settings
- Consider refreshing tokens before they expire
- Verify your server and Okta have synchronized clocks
Security Best Practices
- Use
connect()for authentication - Theconnect({ idToken, clientId })method keeps tokens out of the DOM - Use ticket exchange for SSR - Exchange your Okta JWT for a short-lived ticket server-side instead of passing the JWT to the client
- Use HTTPS for all redirect URIs
- Restrict application access to only the users/groups who need it
- Regularly rotate tokens by implementing proper session management
- Monitor Okta system logs for suspicious authentication attempts

