Overview
The User Management section provides a comprehensive interface to view, create, edit, and manage all users in your Better Auth application. You can perform bulk operations, filter by various criteria, and track user activity.Accessing User Management
Navigate to Users from the main sidebar to access the user management dashboard.Key Features
User List View
The main users page displays:- Total user count - Live count of all users in your system
- Paginated table - Shows 20 users per page with search and filtering
- User details - Profile image, name, email, verification status, and role
- Email verification status - Visual indicator for verified/unverified emails
- Ban status - Shows if a user is currently banned (requires admin plugin)
- Created date - When the user account was created
- Last seen - Last activity timestamp (when events are enabled)
- Sortable columns - Sort by creation date or last seen
Search and Filters
Use filters to quickly find specific users or segments of your user base.
- Email Verified - Filter by verification status (true/false)
- Banned Status - Show only banned or active users (requires admin plugin)
- Created Date - Filter by registration date range using calendar picker
- Role - Filter by user role (text input)
User Actions
View User
Click a user row to view detailed profile information including:
- User ID (copyable)
- Full profile data
- Email verification status
- Account creation and update timestamps
- Last seen activity (if enabled)
Edit User
Update user information:
- Name and email
- Profile image (upload or use avatar)
- User role (if role-based access is enabled)
- Email verification status
Ban/Unban User
Manage user access (requires admin plugin):
- Ban users with optional reason
- Set ban expiration time
- Unban previously banned users
- View ban reason and expiry
Delete User
Permanently remove a user:
- Confirmation modal prevents accidents
- Deletes user and associated data
- Cannot be undone
User Workflows
Create a New User
- Click the Add User button in the top right
- Enter user details:
- Name (required)
- Email address (required)
- Password (required)
- Role (optional)
- Click Create to add the user
- User appears immediately in the list
Edit User Details
- Find the user in the list or use search
- Click the three-dot menu in the actions column
- Select Edit User
- Update the fields you want to change:
- Name, email, or role
- Upload a new profile image
- Click Update to save changes
Ban a User
- Locate the user you want to ban
- Click the three-dot menu → Ban User
- Enter a ban reason (optional but recommended)
- Set ban duration:
- Permanent ban (leave empty)
- Temporary ban (specify minutes)
- Confirm the action
- User is immediately marked as banned
Bulk Operations
Seed Test Users
Quickly populate your database with test users for development:Configure Seeding
- Choose number of users (1-100)
- Optionally specify a default role
- Click Seed Users
User Details View
Click any user row to see comprehensive information:Profile Information
Profile Information
- User ID - Unique identifier (copyable)
- Name - Full display name
- Email - Email address with verification badge
- Profile Image - Avatar or uploaded photo
- Role - User’s assigned role (if applicable)
- Ban Status - Current ban state with reason and expiry
Account Metadata
Account Metadata
- Created At - Account registration timestamp
- Updated At - Last profile update
- Email Verified - Verification status and date
- Last Seen At - Last activity (requires events enabled)
Linked Accounts
Linked Accounts
View OAuth providers connected to this user:
- GitHub, Google, Discord, etc.
- Provider account ID
- Connection date
Advanced Features
Last Seen Tracking
When events are enabled in your Studio configuration:- Studio automatically adds a
lastSeenAtfield to the user model - Run your database migration to add the column:
- The field updates automatically on:
- User sign-in
- Session creation
- Active session verification
- Sort users by “Last Seen” to find inactive accounts
Configure
lastSeenAt in your studio.config.ts:Role-Based Features
If you have theadmin plugin enabled:
- Ban/Unban Actions - Available in user action menu
- Role Assignment - Assign and edit user roles
- Ban Management - Track ban reasons and expiration
Image Upload
When editing users, you can:- Upload profile images (max 5MB)
- Automatic image compression to optimize storage
- Fallback to Dicebear avatars if no image
- Remove existing images
Best Practices
Troubleshooting
Users not appearing in the list
Users not appearing in the list
- Check if filters are active (look for active filter badges)
- Clear all filters using the “Clear all” button
- Verify database connection in Settings
Cannot ban/unban users
Cannot ban/unban users
Ensure the
admin plugin is enabled in your Better Auth configuration:Image upload fails
Image upload fails
- Check file size (max 5MB)
- Ensure file type is an image (png, jpg, jpeg, gif, webp)
- Image is automatically compressed before upload
API Reference
User management operations use the following endpoints:GET /api/users- Fetch users with pagination and filtersPOST /api/users- Create a new userPUT /api/users/:id- Update user detailsDELETE /api/users/:id- Delete a userPOST /api/admin/ban-user- Ban a user (requires admin plugin)POST /api/admin/unban-user- Unban a user (requires admin plugin)POST /api/seed/users- Seed test users