Prerequisites
- A Logto account (Logto Cloud or self-hosted instance)
- Admin access to create applications in Logto
- Access to the Char dashboard
Quick Links
Logto Console
Sign in to Logto Cloud Console
Logto Docs
Official Logto documentation
React Quick Start
React SDK integration guide
GitHub
Logto source code
SDK References
@logto/react
Logto React SDK
@logto/next
Logto Next.js SDK
@logto/browser
Logto Browser SDK
@logto/vue
Logto Vue SDK
All Quick Starts
40+ framework integrations
Configuration Steps
Create an Application in Logto
- Sign in to the Logto Console (or your self-hosted instance)
- Navigate to Applications
- Click Create application
- Select the appropriate application type:
| Application Type | Use Case |
|---|---|
| Single page app | React, Vue, Angular SPAs |
| Traditional web app | Next.js, Express with server sessions |
| Native app | iOS, Android, React Native |
- Follow the setup wizard for your framework
Configure Application Settings
In your application’s settings, configure:
| Setting | Value |
|---|---|
| Redirect URIs | Your application’s callback URL(s) (e.g., https://yourapp.com/callback) |
| Post sign-out redirect URIs | Where users land after logout |
| CORS allowed origins | Your application’s origin(s) |
Note Your Application Credentials
From the application settings, copy:
- App ID - Your application’s client ID
- Endpoint - Your Logto endpoint (e.g.,
https://your-tenant.logto.appor your self-hosted URL)
For traditional web apps, also copy the App Secret for server-side token exchange.
Configure Char
In the Char Dashboard:
- Navigate to Settings → Integration
- Under SSO Configuration, select Custom OIDC as the provider
- Enter your Issuer URL (your Logto endpoint, e.g.,
https://your-tenant.logto.app/oidc) - Enter your Client ID (App ID from Step 3)
- Click Test Connection to verify
- Click Save Changes
Configuration Reference
| Char Field | Logto Value | Example |
|---|---|---|
| Provider Type | Custom OIDC | oidc |
| Issuer URL | Logto endpoint + /oidc | https://your-tenant.logto.app/oidc |
| Client ID | Application App ID | abc123def456 |
Logto’s OIDC issuer URL is your endpoint followed by
/oidc. The JWKS endpoint is at {endpoint}/oidc/jwks and discovery at {endpoint}/oidc/.well-known/openid-configuration.Using Upstream Identity Providers
If you’re using Logto with social connectors (Google, GitHub, etc.) or enterprise SSO, Logto acts as your identity layer. Char validates Logto’s tokens, not the upstream provider’s tokens.Understanding Auth Platforms vs Direct IDPs
Learn how auth platforms like Logto issue their own tokens after upstream OAuth flows
Token Requirements
Char validates Logto ID tokens with these requirements:| Claim | Requirement |
|---|---|
iss | Must match {your-logto-endpoint}/oidc |
aud | Must include your configured App ID |
sub | Required - used as the user identifier |
exp | Must not be expired |
Logto ID Token Claims
Logto ID tokens include standard OIDC claims based on requested scopes:| Scope | Claims Included |
|---|---|
openid | sub (user ID), iss, aud, exp, iat |
profile | name, picture, username |
email | email, email_verified |
Example: Obtaining and Passing the Token
- React (@logto/react)
- Next.js App Router (@logto/next)
- Browser SDK (@logto/browser)
- Vue.js
Organizations and Multi-Tenancy
Logto supports multi-tenant applications with organizations:Custom Token Claims
Logto allows adding custom claims to tokens via the Console:- Go to API resources → Logto management API
- Configure custom JWT claims in the Machine to machine section
- Or use the Custom JWT feature for access tokens
Custom Token Claims
Learn how to add custom claims to Logto tokens
Troubleshooting
INVALID_ISSUER error
INVALID_ISSUER error
The token issuer doesn’t match your configured endpoint:
- Verify the Issuer URL in Char includes
/oidcsuffix (e.g.,https://your-tenant.logto.app/oidc) - Ensure you’re using the correct tenant URL
- For self-hosted instances, verify your
ENDPOINTconfiguration
INVALID_AUDIENCE error
INVALID_AUDIENCE error
The token’s
aud claim doesn’t match your configured App ID:- Ensure the Client ID matches your Logto application’s App ID exactly
- Verify you’re using the ID token (from
getIdTokenClaims().__raw) - Check that the correct application is configured
JWKS_FETCH_FAILED error
JWKS_FETCH_FAILED error
Char couldn’t reach Logto’s JWKS endpoint:
- Verify your Logto instance is accessible
- Check that the endpoint URL is correct
- For self-hosted: ensure
/oidc/jwksis publicly accessible - Use Test Connection in the dashboard to verify
getIdTokenClaims returns undefined
getIdTokenClaims returns undefined
If you can’t get the ID token claims:
- Ensure the user has completed the sign-in flow
- Check that
openidscope is included (it’s included by default) - Verify your redirect URIs match your application settings
cookieSecret must be at least 32 characters
cookieSecret must be at least 32 characters
Logto Features
Logto offers additional features that complement Char integration:| Feature | Description |
|---|---|
| Multi-tenancy | Built-in organization support for B2B apps |
| Enterprise SSO | SAML and OIDC connections for enterprise customers |
| RBAC | Role-based access control with permissions |
| Social Login | 30+ social connectors (Google, GitHub, etc.) |
| Passwordless | Email/SMS magic links and codes |
| MFA | TOTP and backup codes |
| Webhooks | Real-time event notifications |
| Audit Logs | Track authentication events |
Logto Documentation
Explore the full Logto documentation
Self-Hosting Logto
Logto can be self-hosted using Docker:Security Best Practices
- Use HTTPS for all endpoints in production
- Configure CORS to restrict allowed origins
- Set appropriate token expiration times
- Enable MFA for enhanced security
- Review audit logs regularly for suspicious activity
- Use organizations for proper tenant isolation in B2B apps

