Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danny-avila/librechat/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Authentication endpoints handle user login, registration, password reset, and two-factor authentication. All auth endpoints are prefixed with/api/auth.
Login
Authenticate and obtain a JWT token:Request Body
User email address
User password
Response
JWT access token
User object with profile information
Logout
Invalidate the current session:Response
Register
Create a new user account:Request Body
Email address (must be unique)
Password (minimum 8 characters)
Full name
Username (optional)
Password confirmation (if required by server)
Response
Returns the same format as login (token + user object). Note: Registration may require:- Invitation codes (if server is invite-only)
- Email verification before account activation
- Agreement to terms of service
Refresh Token
Refresh an expired or expiring JWT token:Query Parameters
Set to
true to retry refreshResponse
Password Reset
Request Password Reset
Send a password reset email:Email address of the account
Response
Reset Password
Reset password using token from email:User ID from reset email
Reset token from email
New password
Response
Two-Factor Authentication
Enable 2FA
Enable two-factor authentication:Response
QR code data URL for authenticator app
TOTP secret for manual entry
One-time backup codes
Verify 2FA Code
Verify a TOTP code:6-digit TOTP code from authenticator app
Confirm 2FA
Confirm and activate 2FA:Disable 2FA
Disable two-factor authentication:6-digit TOTP code to confirm disable
Regenerate Backup Codes
Generate new backup codes:Response
Verify with Temp Token
Complete 2FA verification during login:Temporary token from login response
6-digit TOTP code or backup code
Response
OAuth / Social Login
Google OAuth
Initiate Google OAuth flow:Facebook OAuth
Initiate Facebook OAuth flow:Graph Token (Microsoft)
Obtain Microsoft Graph API token:Query Parameters
Space-separated Microsoft Graph scopes (URL-encoded)
Response
LDAP Authentication
If LDAP is configured (LDAP_URL and LDAP_USER_SEARCH_BASE environment variables), the login endpoint will authenticate against LDAP instead of local database.
Error Responses
Invalid Credentials
Email Already Exists
Weak Password
Account Banned
Rate Limited
Invalid 2FA Token
Security Features
- Rate Limiting: Login and registration endpoints have strict rate limits
- Password Hashing: Passwords are hashed using bcrypt
- JWT Expiration: Tokens expire and require refresh
- HTTPS Required: Production deployments should use HTTPS
- CSRF Protection: Session cookies include CSRF tokens
- Account Lockout: Multiple failed login attempts may lock the account
- Email Verification: Optional email verification before account activation