Skip to main content
LangWatch supports SSO via NextAuth.js. Choose one provider and configure it as described below.

Supported Providers

OAuth Redirect URL

When configuring your identity provider, set the redirect/callback URL to:
Replace {provider} with: auth0, azure-ad, cognito, github, gitlab, google, or okta.

Provider Setup

Email/Password

The default mode (NEXTAUTH_PROVIDER=email) needs no identity provider. Users register with an email and password, and a self-service “Forgot password?” link on the sign-in screen lets them reset a forgotten one. Reset links are sent through the same transactional email provider as the rest of LangWatch. Configure SendGrid or AWS SES as described in Third-party integrations so the reset email can be delivered. If no email provider is configured, the request still returns the same neutral confirmation but no email is sent. The reset link expires one hour after it is issued, and a completed reset signs out the account’s other active sessions. When NEXTAUTH_PROVIDER is set to any SSO provider below, the credential form and the “Forgot password?” link are not shown, and the password reset endpoints are disabled.

Auth0

  1. Create an application in the Auth0 Dashboard
  2. Set Allowed Callback URLs to https://your-domain.com/api/auth/callback/auth0
  3. Configure in Helm:
Or via environment variables:

Azure AD

  1. Register an application in Azure Portal > App registrations
  2. Add a Redirect URI: https://your-domain.com/api/auth/callback/azure-ad
  3. Create a client secret under Certificates & secrets
  4. Configure in Helm:

AWS Cognito

  1. Create a User Pool in AWS Cognito
  2. Add an app client with a Callback URL: https://your-domain.com/api/auth/callback/cognito
  3. Configure in Helm:

GitHub

  1. Create an OAuth App in GitHub Developer Settings
  2. Set Authorization callback URL to https://your-domain.com/api/auth/callback/github
  3. Configure:

GitLab

  1. Create an application in GitLab > Applications
  2. Set Redirect URI to https://your-domain.com/api/auth/callback/gitlab
  3. Select scopes: read_user, openid, profile, email

Google

  1. Create credentials in Google Cloud Console
  2. Add an Authorized redirect URI: https://your-domain.com/api/auth/callback/google

Okta

  1. Create an application in Okta Admin Console
  2. Set Sign-in redirect URI to https://your-domain.com/api/auth/callback/okta

Domain-to-Organization Mapping

For on-premises deployments with SSO, map email domains to organizations:
This ensures users with @yourcompany.com emails are automatically associated with the correct organization.

Migrating from Email/Password to SSO

  1. Enable SSO by setting the provider configuration above
  2. Flag existing email/password users for SSO migration:
  1. When flagged users next sign in via SSO, their accounts are automatically linked
Users keep their existing data, projects, and permissions after the SSO migration. The migration only changes their authentication method.