librechat.yaml.
Local Authentication
Email and password authentication is enabled by default.Enable email/password authentication
Allow new user registration
Enable password reset functionality
Allow login without email verification
Social Login (OAuth)
Enable social authentication providers.Enable OAuth social login
Allow registration via social providers
Configure Providers in YAML
Google OAuth
Google OAuth client ID
Google OAuth client secret
OAuth callback URL
GitHub OAuth
GitHub OAuth client ID
GitHub OAuth client secret
OAuth callback URL
GitHub Enterprise
Base URL for GitHub Enterprise server
User agent for GitHub Enterprise API
Discord OAuth
Discord OAuth client ID
Discord OAuth client secret
OAuth callback URL
.env
Facebook OAuth
Facebook OAuth client ID
Facebook OAuth client secret
OAuth callback URL
.env
Apple OAuth
Apple OAuth client ID (Service ID)
Apple Developer Team ID
Apple Key ID for the private key
Path to Apple private key file (.p8)
OAuth callback URL
.env
OpenID Connect
Generic OpenID Connect provider support.OpenID Connect client ID
OpenID Connect client secret
OpenID Connect issuer URL
Session secret for OpenID authentication
OAuth scopes to request
OAuth callback URL
User Mapping
User info property for username
User info property for display name
User info claim for email/identifier
Defaults to: email → preferred_username → upn
Role-Based Access
Required role for access
Token kind for role validation
Path to role in token
Role that grants admin access
Path to admin role in token
UI Customization
Custom label for OpenID login button
Custom icon URL for OpenID login button
Automatically redirect to OpenID provider on login page
Advanced Options
Use PKCE (Proof Key for Code Exchange) for enhanced security
Reuse OpenID tokens for authentication instead of MongoDB session
Enable caching of JWKS signing key verification
JWKS cache time in milliseconds (10 minutes)
Trigger token exchange flow for userinfo endpoint
Scope for on-behalf flow (e.g., Microsoft Graph API)
Use OpenID Connect end session endpoint for logout
URL to redirect after OpenID logout
Defaults to $/login
Optional audience parameter for authorization requests
SAML Authentication
If OpenID is enabled, SAML is automatically disabled
SAML Identity Provider entry point URL
SAML Service Provider issuer
SAML Identity Provider certificate
SAML callback URL
Session secret for SAML authentication
Attribute Mappings
SAML attribute for email
SAML attribute for username
SAML attribute for first name
SAML attribute for last name
SAML attribute for profile picture
SAML attribute for full name
UI Customization
Custom label for SAML login button
Custom icon URL for SAML login button
Signature Settings
Whether the SAML Response should be signed
true: Entire SAML Response will be signedfalseor unset: Only SAML Assertion will be signed (default)
.env
LDAP Authentication
LDAP server URL
LDAP bind distinguished name
LDAP bind password
Base DN for user search
LDAP search filter
Path to CA certificate for LDAP TLS
Reject unauthorized TLS certificates
Enable STARTTLS
Use username instead of email for login
Attribute Mappings
LDAP attribute for user ID
LDAP attribute for username
LDAP attribute for email
LDAP attribute for full name
Set
MIN_PASSWORD_LENGTH=1 when using LDAP to bypass local password validation, as LDAP servers handle their own password policies.Microsoft Entra ID Integration
Enable Entra ID people search in permissions/sharing system
Searches both local database and Entra ID
Consider Entra ID group owners as members
Microsoft Graph API scopes for people/group search
.env
SharePoint Integration
Requires Entra ID (OpenID) authentication
Enable SharePoint file picker in chat and agent panels
SharePoint tenant base URL
SharePoint scope for file picker
Microsoft Graph API scope for file picker
Two-Factor Authentication
Two-factor authentication (2FA) is available through the API endpoints:POST /auth/2fa/enable- Enable 2FA for userPOST /auth/2fa/verify- Verify 2FA codePOST /auth/2fa/confirm- Confirm 2FA setupPOST /auth/2fa/disable- Disable 2FAPOST /auth/2fa/backup/regenerate- Regenerate backup codes