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:

SettingValue
Allowed Callback URLhttps://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.

  1. In the left sidebar, click ApplicationsApplications

Create a new application

  1. Click Create Application (top right)
  2. Enter application name: Ledly SSO
  3. Select Regular Web Applications
  4. Click Create

Step 2: Configure Application Settings

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:

FieldDescription
DomainYour Auth0 tenant domain (e.g., your-tenant.auth0.com)
Client IDYour application’s client ID
Client SecretYour 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:

FieldValue
Allowed Callback URLshttps://ledlyv2-production.up.railway.app/api/sso/auth0/callback
Allowed Logout URLshttps://app.ledly.io (optional)
Allowed Web Originshttps://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:

On your application page, click the Connections tab.

Enable connections

Enable the connections you want users to authenticate with:

Connection TypeUse Case
DatabaseUsername/password authentication
GoogleSign in with Google
MicrosoftSign in with Microsoft
SAMLEnterprise SAML connections
LDAPOn-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 AuthenticationEnterprise in Auth0.


Step 4: Configure Ledly

Now configure Ledly to use your Auth0 application:

  1. Log in to Ledly at app.ledly.io
  2. Go to SettingsSSO

Select Auth0

Select Auth0 (OIDC) as your identity provider.

Enter Configuration Values

Enter the values you collected from Auth0:

FieldValue
DomainYour Auth0 domain (e.g., your-tenant.auth0.com)
Client IDYour Auth0 application Client ID
Client SecretYour Auth0 application Client Secret

Configure SSO Options

OptionRecommended Setting
Auto-provision usersEnabled - Creates accounts for new SSO users
Default roleMember - New users start with member permissions
Allow password loginYour choice - Enable for fallback access

Save Configuration

Click Save to apply the SSO configuration.


Step 5: Test SSO

Test with an Admin Account First

  1. Open an incognito/private browser window
  2. Navigate to your Ledly login page
  3. Click Sign in with SSO or enter your email
  4. Verify you’re redirected to Auth0 login
  5. Sign in with your credentials
  6. Confirm you’re redirected back to Ledly and logged in

Verify User Attributes

After logging in via SSO:

  1. Go to SettingsProfile
  2. Verify your name and email were populated correctly

Test JIT Provisioning (Optional)

  1. Have a user who doesn’t have a Ledly account sign in via SSO
  2. Verify their account was automatically created

Configuration Reference

OIDC Endpoints

Auth0 uses standard OIDC discovery. Endpoints are derived from your domain:

EndpointURL
Discoveryhttps://{domain}/.well-known/openid-configuration
Authorizationhttps://{domain}/authorize
Tokenhttps://{domain}/oauth/token
UserInfohttps://{domain}/userinfo

Requested Scopes

Ledly requests the following OIDC scopes:

ScopePurpose
openidRequired for OIDC
profileAccess to user’s name
emailAccess to user’s email address

Token Lifetimes

Default Auth0 token lifetimes (configurable in Auth0):

TokenDefault Lifetime
Access token24 hours
Refresh token30 days (or until revoked)
ID token10 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):

  1. Configure custom domain in Auth0 Dashboard → BrandingCustom Domains
  2. 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:

  1. Go to SecurityMulti-factor Auth
  2. Enable desired MFA factors (Push, SMS, TOTP)
  3. Configure policies

MFA enforcement in Auth0 will apply to all Ledly SSO logins.

Branding

Customize the Auth0 login page to match your organization:

  1. Go to BrandingUniversal Login
  2. Customize colors, logo, and text
  3. 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:

  1. Verify the Client ID in Auth0 matches Ledly configuration
  2. 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:

  1. In Auth0, go to your application settings
  2. Copy the current Client Secret
  3. 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/callback

Check for:

  • Trailing slashes
  • HTTP vs HTTPS
  • Typos

”Invalid Domain” Error

Possible causes:

  • Domain format is incorrect
  • Tenant doesn’t exist

Solutions:

  1. Verify the domain format (should be your-tenant.auth0.com or custom domain)
  2. Don’t include https:// in the domain field
  3. 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:

  1. Go to your Auth0 application → Connections tab
  2. 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:

  1. Enable “Auto-provision users” in Ledly SSO settings
  2. Verify the user exists in Auth0 → User ManagementUsers

Revoking SSO Access

Remove Individual User Access

In Auth0:

  1. Go to User ManagementUsers
  2. Find the user
  3. Click on the user → ActionsBlock or Delete

Revoke Application Access

To prevent all users from using Ledly via Auth0:

  1. Go to ApplicationsApplications
  2. Find your Ledly application
  3. Toggle off the application or delete it

Disable SSO in Ledly

  1. Go to SettingsSSO
  2. 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

  1. Configure Auth0 SSO in Ledly (don’t disable old SSO yet)
  2. Test with a few users
  3. Verify account linking works correctly

Complete migration

  1. Migrate all users to Auth0
  2. Disable the old SSO configuration in Ledly
  3. Update the primary SSO configuration

Support

If you need help with Auth0 SSO setup:

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)