Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Registration Object Structure

Example

# Example Registration Object Structure
registration:
  socialLogins: ["google", "facebook", "github", "discord", "openid"]
  allowedDomains:
    - "gmail.com"
    - "protonmail.com"
  oauthStateTtlMs: 600000
  openidDiscovery:
    startupAttempts: 1
    retryDelayMs: 5000

socialLogins

Key:

KeyTypeDescriptionExample
socialLoginsArray of StringsDefines the available social login providers and their display order.The order of the providers in the list determines their appearance order on the login/registration page. Each provider listed must be properly configured within the system to be active and available for users. This configuration allows for a tailored authentication experience, emphasizing the most relevant or preferred social login options for your user base.

Example:

socialLogins: ["google", "facebook", "github", "discord", "openid"]

allowedDomains

Key:

KeyTypeDescriptionExample
allowedDomainsArray of StringsA list specifying allowed email domains for registration.Users with email domains not listed will be restricted from registering.

This key is optional. If you omit it, registration is allowed for any email domain.

Example:

allowedDomains:
  - "gmail.com"
  - "protonmail.com"

oauthStateTtlMs

Key:

KeyTypeDescriptionExample
oauthStateTtlMsIntegerMilliseconds a started social login may take to reach its callback before the login attempt is rejected.Range: 60000 to 3600000. Default: 600000 (10 minutes).

Example:

oauthStateTtlMs: 900000

openidDiscovery

Controls how LibreChat retries OpenID Connect discovery against your identity provider. Each field set here takes precedence over the matching environment variable (OPENID_DISCOVERY_RETRY_ATTEMPTS, OPENID_DISCOVERY_RETRY_DELAY_MS); fields you leave unset fall back to the environment variable, then to the default.

Keys:

KeyTypeDescriptionExample
startupAttemptsIntegerDiscovery attempts made before startup continues. 0 retries only in the background.Range: 0 to 100. Default: 1.
retryDelayMsIntegerMilliseconds between startup and background discovery attempts.Range: 100 to 3600000. Default: 5000.

Example:

openidDiscovery:
  startupAttempts: 3
  retryDelayMs: 10000

How is this guide?