Overview
Open WebUI provides enterprise-grade authentication with support for multiple authentication methods, SSO providers, and granular permission controls.Authentication Methods
- Email/Password
- OAuth/OIDC
- LDAP
- Trusted Headers
Traditional credential-based authentication:
- Secure password hashing with bcrypt
- Password validation rules
- Account creation and management
- Password reset workflows
Sign Up & Sign In
User Registration
New users can create accounts through the sign-up flow:1
Navigate to Sign Up
Access the registration page at
/auth/signup2
Provide Details
3
Account Creation
- First user becomes admin automatically
- Subsequent users get the default role (configured in settings)
- Email validation ensures proper format
4
Automatic Sign In
Upon successful registration, users are automatically signed in
Password requirements are enforced server-side. Passwords are hashed using bcrypt and never stored in plain text.
Sign In Process
Authenticate existing users:Rate Limiting
LDAP Authentication
Integrate with corporate directories.Configuration
Configure LDAP settings through the admin panel:LDAP Authentication Flow
1
User Submits Credentials
2
Directory Lookup
Open WebUI searches LDAP for the user:
- Queries using configured search base and filters
- Retrieves user attributes (email, name, groups)
3
Credential Verification
Binds to LDAP using the user’s DN and password to verify credentials
4
Account Provisioning
- Creates local account if it doesn’t exist
- First LDAP user becomes admin
- Subsequent users get default role
5
Group Synchronization
If enabled, synchronizes LDAP groups to Open WebUI groups
LDAP Group Management
Automatic group synchronization:- Auto-sync: Groups updated on each login
- Group creation: Automatically creates missing groups
- CN extraction: Extracts group names from DNs
- Role preservation: Doesn’t affect admin users
OAuth/SSO Integration
Supported Providers
Configure multiple OAuth providers:- OpenID Connect (OIDC)
- GitHub
- Microsoft Azure AD
- Okta
- Custom providers
OAuth Flow
1
User Initiates Login
Click “Sign in with [Provider]” button
2
Redirect to Provider
User is redirected to OAuth provider for authentication
3
Authorization Grant
User approves application access
4
Token Exchange
Provider returns authorization code, exchanged for access token
5
User Info Retrieval
Open WebUI fetches user profile from provider
6
Account Linking
- Links OAuth account to existing user (if email matches)
- Creates new user if no match found
Token Exchange Endpoint
Exchange external OAuth tokens for Open WebUI JWT:This endpoint is disabled by default. Set
ENABLE_OAUTH_TOKEN_EXCHANGE=true to enable.Trusted Header Authentication
Integrate with reverse proxy SSO.Configuration
How It Works
1
Proxy Authentication
Reverse proxy (Nginx, Traefik, etc.) handles authentication
2
Header Injection
Proxy adds trusted headers with user information
3
Account Auto-Creation
Open WebUI:
- Reads headers on each request
- Creates user if doesn’t exist
- Updates name/groups from headers
4
Automatic Sign-In
User is automatically authenticated without credentials
Session Management
JWT Tokens
Open WebUI uses JWT for session management:Token Configuration
Customize token behavior:ms: millisecondss: secondsm: minutesh: hoursd: daysw: weeks-1: No expiration
Cookie Settings
Sign Out
Terminate user sessions:- Invalidates JWT token
- Clears browser cookies (
token,oui-session,oauth_id_token) - Optionally redirects to OAuth provider logout
- Returns to configured redirect URL
OAuth Logout
For OAuth users, sign-out includes:- Retrieval of provider’s end session endpoint
- Redirect to provider logout URL
- Return to configured
WEBUI_AUTH_SIGNOUT_REDIRECT_URL
User Profile Management
Viewing Profile
Get current user information:Updating Profile
Modify profile information:Changing Password
1
Submit Request
2
Verification
Current password is verified against stored hash
3
Validation
New password validated against security requirements
4
Update
Password hash updated in database
API Keys
Generate API keys for programmatic access.Creating API Keys
Using API Keys
Managing API Keys
- View Key
- Regenerate
- Delete
API Key Restrictions
Optionally restrict API key usage:API key functionality requires the
features.api_keys permission for users.Admin Functions
Adding Users
Admins can create user accounts:Admin Configuration
Manage authentication settings:Admin Contact Display
Show admin contact information to users:Security Best Practices
Strong Passwords
- Minimum length requirements
- Complexity validation
- Bcrypt hashing with salt
- 72-byte maximum for bcrypt compatibility
Rate Limiting
- Sign-in attempt throttling
- Redis-backed rate limiter
- Configurable time windows
Secure Cookies
- HttpOnly flag set
- SameSite protection
- Secure flag for HTTPS
- Proper expiration
Token Security
- JWT signed with secret
- Expiration enforcement
- Token invalidation on logout
- Secure storage recommendations
Troubleshooting
Common Issues
Failed LDAP Authentication
Failed LDAP Authentication
Check:
- LDAP server connectivity and port
- TLS/SSL certificate validation
- Search base and filter syntax
- App DN credentials
- User attribute mappings
OAuth Login Fails
OAuth Login Fails
Verify:
- Redirect URI matches OAuth app config
- Client ID and secret are correct
- OAuth scopes include email
- Provider allows account merging
Trusted Headers Not Working
Trusted Headers Not Working
Ensure:
- Headers are properly configured in proxy
- Header names match environment variables
- Open WebUI not directly exposed
- Headers properly URL-encoded
API Key Not Accepted
API Key Not Accepted
Confirm:
- API keys are enabled in settings
- User has
features.api_keyspermission - Key not expired or deleted
- Endpoint restrictions allow the request