Auth0 SSO Setup (OIDC)
This guide walks you through configuring Auth0 as your identity provider for Ledly using OpenID Connect (OIDC).
Auth0 SSO requires an Auth0 account with appropriate permissions and a Ledly Enterprise plan ($1,999/mo).
Prerequisites
- Auth0 account with Admin or Application Admin permissions
- Auth0 tenant (domain)
- Ledly organization administrator access
- Ledly Enterprise plan ($1,999/mo)
Configuration Values
You’ll need this Ledly value when configuring Auth0:
| Setting | Value |
|---|---|
| Allowed Callback URL | https://ledlyv2-production.up.railway.app/api/sso/auth0/callback |
Step 1: Create Auth0 Application
Log in to Auth0 Dashboard
Navigate to manage.auth0.com and sign in.
Navigate to Applications
- In the left sidebar, click Applications → Applications
Create a new application
- Click Create Application (top right)
- Enter application name:
Ledly SSO - Select Regular Web Applications
- Click Create
Step 2: Configure Application Settings
Navigate to Settings tab
After creating the application, you’ll be on the application page. Click the Settings tab.
Copy credentials
From the Basic Information section, copy these values:
| Field | Description |
|---|---|
| Domain | Your Auth0 tenant domain (e.g., your-tenant.auth0.com) |
| Client ID | Your application’s client ID |
| Client Secret | Your application’s client secret |
Keep your Client Secret secure. This value should never be exposed publicly.
Configure Application URIs
Scroll down to Application URIs and set:
| Field | Value |
|---|---|
| Allowed Callback URLs | https://ledlyv2-production.up.railway.app/api/sso/auth0/callback |
| Allowed Logout URLs | https://app.ledly.io (optional) |
| Allowed Web Origins | https://app.ledly.io (optional) |
Configure Token Settings (Optional)
Under ID Token settings, you can configure token lifetimes if needed. Default settings work for most cases.
Save Changes
Click Save Changes at the bottom of the page.
Step 3: Configure Connections
Ensure your Auth0 application has the appropriate identity connections enabled:
Navigate to Connections tab
On your application page, click the Connections tab.
Enable connections
Enable the connections you want users to authenticate with:
| Connection Type | Use Case |
|---|---|
| Database | Username/password authentication |
| Sign in with Google | |
| Microsoft | Sign in with Microsoft |
| SAML | Enterprise SAML connections |
| LDAP | On-premises directory |
Toggle on the connections you want to allow for this application.
If you’re using Auth0 to federate to other identity providers (like your organization’s SAML IdP), configure those under Authentication → Enterprise in Auth0.
Step 4: Configure Ledly
Now configure Ledly to use your Auth0 application:
Navigate to SSO Settings
- Log in to Ledly at app.ledly.io
- Go to Settings → SSO
Select Auth0
Select Auth0 (OIDC) as your identity provider.
Enter Configuration Values
Enter the values you collected from Auth0:
| Field | Value |
|---|---|
| Domain | Your Auth0 domain (e.g., your-tenant.auth0.com) |
| Client ID | Your Auth0 application Client ID |
| Client Secret | Your Auth0 application Client Secret |
Configure SSO Options
| Option | Recommended Setting |
|---|---|
| Auto-provision users | Enabled - Creates accounts for new SSO users |
| Default role | Member - New users start with member permissions |
| Allow password login | Your choice - Enable for fallback access |
Save Configuration
Click Save to apply the SSO configuration.
Step 5: Test SSO
Test with an Admin Account First
- Open an incognito/private browser window
- Navigate to your Ledly login page
- Click Sign in with SSO or enter your email
- Verify you’re redirected to Auth0 login
- Sign in with your credentials
- Confirm you’re redirected back to Ledly and logged in
Verify User Attributes
After logging in via SSO:
- Go to Settings → Profile
- Verify your name and email were populated correctly
Test JIT Provisioning (Optional)
- Have a user who doesn’t have a Ledly account sign in via SSO
- Verify their account was automatically created
Configuration Reference
OIDC Endpoints
Auth0 uses standard OIDC discovery. Endpoints are derived from your domain:
| Endpoint | URL |
|---|---|
| Discovery | https://{domain}/.well-known/openid-configuration |
| Authorization | https://{domain}/authorize |
| Token | https://{domain}/oauth/token |
| UserInfo | https://{domain}/userinfo |
Requested Scopes
Ledly requests the following OIDC scopes:
| Scope | Purpose |
|---|---|
openid | Required for OIDC |
profile | Access to user’s name |
email | Access to user’s email address |
Token Lifetimes
Default Auth0 token lifetimes (configurable in Auth0):
| Token | Default Lifetime |
|---|---|
| Access token | 24 hours |
| Refresh token | 30 days (or until revoked) |
| ID token | 10 hours |
Advanced Configuration
Custom Domains
If you’re using a custom domain in Auth0 (e.g., auth.yourcompany.com instead of your-tenant.auth0.com):
- Configure custom domain in Auth0 Dashboard → Branding → Custom Domains
- Use the custom domain in Ledly’s SSO configuration
Rules and Actions
You can use Auth0 Rules or Actions to:
- Add custom claims to tokens
- Enforce additional authentication requirements
- Log authentication events
- Integrate with other services
Example Action to add department to token:
exports.onExecutePostLogin = async (event, api) => {
const namespace = 'https://ledly.io';
api.idToken.setCustomClaim(`${namespace}/department`, event.user.user_metadata.department);
};Multi-factor Authentication
Enable MFA in Auth0 for additional security:
- Go to Security → Multi-factor Auth
- Enable desired MFA factors (Push, SMS, TOTP)
- Configure policies
MFA enforcement in Auth0 will apply to all Ledly SSO logins.
Branding
Customize the Auth0 login page to match your organization:
- Go to Branding → Universal Login
- Customize colors, logo, and text
- Enable the new Universal Login experience for a modern look
Troubleshooting
”Invalid Client” Error
Possible causes:
- Client ID was not copied correctly
- Application was deleted
Solutions:
- Verify the Client ID in Auth0 matches Ledly configuration
- Check that the application still exists in Auth0
”Invalid Client Secret” Error
Possible causes:
- Client Secret was not copied correctly
- Client Secret was rotated
Solutions:
- In Auth0, go to your application settings
- Copy the current Client Secret
- Update it in Ledly SSO settings
”Callback URL Mismatch” Error
Possible causes:
- Allowed Callback URL doesn’t match exactly
Solution: Verify the Allowed Callback URL in Auth0 is exactly:
https://ledlyv2-production.up.railway.app/api/sso/auth0/callbackCheck for:
- Trailing slashes
- HTTP vs HTTPS
- Typos
”Invalid Domain” Error
Possible causes:
- Domain format is incorrect
- Tenant doesn’t exist
Solutions:
- Verify the domain format (should be
your-tenant.auth0.comor custom domain) - Don’t include
https://in the domain field - Check that your Auth0 tenant is active
”Connection Not Enabled” Error
Possible causes:
- The user’s identity connection isn’t enabled for the application
Solution:
- Go to your Auth0 application → Connections tab
- Enable the appropriate connection for how the user is trying to authenticate
”User Not Found” Error
Possible causes:
- JIT provisioning is disabled in Ledly
- User doesn’t exist in Auth0
Solutions:
- Enable “Auto-provision users” in Ledly SSO settings
- Verify the user exists in Auth0 → User Management → Users
Revoking SSO Access
Remove Individual User Access
In Auth0:
- Go to User Management → Users
- Find the user
- Click on the user → Actions → Block or Delete
Revoke Application Access
To prevent all users from using Ledly via Auth0:
- Go to Applications → Applications
- Find your Ledly application
- Toggle off the application or delete it
Disable SSO in Ledly
- Go to Settings → SSO
- Toggle off the SSO configuration or select “None” as provider
Migrating from Another IdP
If you’re migrating from another identity provider to Auth0:
Set up Auth0 connections
Configure Auth0 to connect to your existing identity sources (database migration, SAML, etc.)
Test in parallel
- Configure Auth0 SSO in Ledly (don’t disable old SSO yet)
- Test with a few users
- Verify account linking works correctly
Complete migration
- Migrate all users to Auth0
- Disable the old SSO configuration in Ledly
- Update the primary SSO configuration
Support
If you need help with Auth0 SSO setup:
- Ledly Support: [email protected]
- Auth0 Documentation: auth0.com/docs
When contacting support, include:
- Your Ledly organization ID
- Your Auth0 tenant domain (not the client secret)
- Any error messages displayed
- Screenshots of your Auth0 configuration (redact secrets)