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:Account Creation
- First user becomes admin automatically
- Subsequent users get the default role (configured in settings)
- Email validation ensures proper format
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
Directory Lookup
Open WebUI searches LDAP for the user:
- Queries using configured search base and filters
- Retrieves user attributes (email, name, groups)
Account Provisioning
- Creates local account if it doesn’t exist
- First LDAP user becomes admin
- Subsequent users get default role
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
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
Account Auto-Creation
Open WebUI:
- Reads headers on each request
- Creates user if doesn’t exist
- Updates name/groups from headers
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
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