Complete guide for the public authentication system, user roles, and user management in the admin panel.
- Overview
- User Roles
- Public Login
- Profile Management
- Admin User Management
- Security
- Multilingual Support
- Troubleshooting
The application features a complete public authentication system that is separate from the Filament admin panel:
- π₯ Public Users - Can login and manage their own profiles
- π¨βπΌ Admin Users - Have access to admin panel plus all public features
- π Password Security - All passwords hashed with bcrypt
- π Multilingual - Login and profile pages available in FR, EN, DE
- π Dark Mode - Full dark mode support on all authentication pages
βββββββββββββββββββββββββββββββββββββββββββ
β Authentication System v2.0 β
βββββββββββββββββββββββββββββββββββββββββββ€
β β
β Public Routes (No Auth Required) β
β βββ GET /login Login page β
β βββ POST /login Authenticate β
β β
β Protected Routes (Login Required) β
β βββ GET /profile Profile page β
β βββ POST /profile Edit profile β
β βββ POST /logout Logout β
β β
β Admin Routes (Admin Only) β
β βββ /admin/resources/users User CRUD β
β β
βββββββββββββββββββββββββββββββββββββββββββ
A user account without admin privileges.
Permissions:
- β
Login to public login page (
/login) - β
Access profile page (
/profile) - β Edit own name and email
- β Change own password
- β Cannot access admin panel (
/admin)
Database Field: is_admin = false
A user account with full admin privileges.
Permissions:
- β
Login to public login page (
/login) - β
Automatically redirected to admin panel (
/admin) - β Full access to admin panel (all resources, settings)
- β Manage all users (create, edit, delete)
- β View all API clients, keys, logs
- β Configure application settings
Database Field: is_admin = true
URL: GET /login
The login page provides a simple, secure form for users to authenticate.
- π± Responsive Design - Works on mobile and desktop
- π Dark Mode - Respects browser and user theme preference
- π Multilingual - Available in FR, EN, DE
β οΈ Error Messages - Clear feedback on failed attempts- β Form Validation - Client-side and server-side validation
βββββββββββββββββββββββββββββββββββββββ
β Login to API Manager β
βββββββββββββββββββββββββββββββββββββββ€
β β
β Email Address: β
β [_____________________________] β
β β
β Password: β
β [_____________________________] β
β β
β [ ] Remember me β
β β
β [Login Button] β
β β
βββββββββββββββββββββββββββββββββββββββ
Step 1: User submits form
POST /login
Content-Type: application/x-www-form-urlencoded
email=user@example.com&password=secret123Step 2: Application validates
- Email exists in database
- Password matches hash
- Account is not deleted
Step 3: Success β Role-based redirect
If is_admin = true:
β Redirect to GET /admin
If is_admin = false:
β Redirect to GET /profile
Step 4: Error β Show form with message
Invalid email or password. Please try again.
Client-Side (Browser):
- Email: Required, must be valid email format
- Password: Required, minimum 8 characters
Server-Side (Laravel):
- Email: Required, email format, must exist in users table
- Password: Required, must match bcrypt hash
After successful login:
- User session created with encrypted cookie
auth()->user()available in controllers/views- Session expires after 2 hours of inactivity (configurable)
- Session can be cleared by logout
Currently, the application:
- Shows generic error message
- Does not lock accounts after multiple failures
- Logs failed attempts in application logs
Note: For production, consider adding:
- Rate limiting per IP (e.g., 5 attempts per 15 minutes)
- Account lockout after N failed attempts
- Email notification on suspicious activity
URL: GET /profile (requires login)
Protected page where logged-in users can view and edit their profile.
- π Edit Name & Email - Update personal information
- π Change Password - Secure password update
- π§ Email Verification - Optional email verification on change
- β Form Validation - All fields validated
- πΎ Persistent - All changes saved immediately
- π± Responsive - Works on all devices
- π Dark Mode - Full dark mode support
Allows users to update their basic information:
βββββββββββββββββββββββββββββββββββββββββββ
β Edit Profile β
βββββββββββββββββββββββββββββββββββββββββββ€
β β
β Full Name: β
β [John Doe_____________________] β
β β
β Email Address: β
β [john@example.com____________] β
β β
β [Save Changes] β
β β
β β
Changes saved successfully! β
β β
βββββββββββββββββββββββββββββββββββββββββββ
Fields:
name(Required, minimum 2 characters)email(Required, valid email format, must be unique)
Validation:
- Name:
required|string|min:2|max:255 - Email:
required|email|unique:users,email,{id}|max:255
Success: Form clears, success message shown, database updated
Error: Field errors displayed inline, existing data retained
Allows users to securely update their password:
βββββββββββββββββββββββββββββββββββββββββββ
β Change Password β
βββββββββββββββββββββββββββββββββββββββββββ€
β β
β Current Password: β
β [________________________] β
β β
β New Password: β
β [________________________] β
β β
β Confirm Password: β
β [________________________] β
β β
β [Update Password] β
β β
β β
Password updated successfully! β
β β
βββββββββββββββββββββββββββββββββββββββββββ
Fields:
current_password(Required, must match user's password)new_password(Required, minimum 8 characters, different from current)password_confirmation(Required, must match new_password)
Validation:
- Current password:
required|current_password - New password:
required|string|min:8|confirmed|different:current_password
Security:
- Current password verified before allowing change
- New password hashed with bcrypt before storage
- Old password immediately invalidated
- User not logged out (session continues)
Success: Password hash updated in database, success message shown
Error: Validation errors displayed inline, password not changed
URL: /admin/resources/users
Only accessible to admin users. Provides full CRUD operations for all users.
Features:
- β Create Users - Add new user accounts
- β Read Users - List all users with search/filter
- β Update Users - Edit user details and password
- β Delete Users - Remove user accounts
- β Search - Find users by name or email
- β Pagination - View 10 users per page
- π Multilingual - Resource labels in FR, EN, DE
- π Dark Mode - Full Filament dark mode support
Action: Click "Create" button in user list
ββββββββββββββββββββββββββββββββββββββββββ
β Create New User β
ββββββββββββββββββββββββββββββββββββββββββ€
β β
β Name: β
β [_____________________________] β
β β
β Email: β
β [_____________________________] β
β β
β Password: β
β [_____________________________] β
β β
β Admin: β
β [No βΌ] β Toggle to make admin β
β β
β [Cancel] [Create] β
β β
ββββββββββββββββββββββββββββββββββββββββββ
Required Fields:
name- Full name (required, 2-255 characters)email- Email address (required, valid email, unique)password- Initial password (required, min 8 chars, auto-hashed)is_admin- Admin role toggle (optional, default false)
After Creation:
- User receives initial password (communicate securely to user)
- User can login with email and password
- User can change password on first login
- Admin user gets
/adminaccess
Action: Navigate to /admin/resources/users
Shows a table of all users with:
- Name
- Admin status (badge)
- Created date
- Last updated date
- Action buttons (Edit, Delete)
Search: Enter name or email to filter users
Pagination: 10 users per page, navigate with arrows
Action: Click "Edit" button next to user
ββββββββββββββββββββββββββββββββββββββββββ
β Edit User (John Doe) β
ββββββββββββββββββββββββββββββββββββββββββ€
β β
β Name: β
β [John Doe_____________________] β
β β
β Email: β
β [john@example.com____________] β
β β
β Change Password: β
β [_____ New password (optional)____] β
β [Password is only updated if filled] β
β β
β Admin: β
β [Yes βΌ] β Toggle to change role β
β β
β Created: Jan 15, 2026 at 10:30 AM β
β Updated: Mar 20, 2026 at 02:15 PM β
β β
β [Cancel] [Update] β
β β
ββββββββββββββββββββββββββββββββββββββββββ
Editable Fields:
name- Full name (required, 2-255 characters)email- Email address (required, valid email, unique except self)password- Change password (optional, only if filled, min 8 chars)is_admin- Admin role toggle
Important:
- Password field is optional
- If left empty, password is NOT changed
- If filled, it MUST be at least 8 characters
- Password is automatically hashed with bcrypt before saving
- Email uniqueness checked (except for this user's current email)
After Update:
- User data immediately updated in database
- Changes take effect on user's next page load
- User session continues (not forced to logout)
Action: Click "Delete" button next to user
ββββββββββββββββββββββββββββββββββββββββββ
β Are you sure you want to delete this? β
β β
β This action cannot be undone. β
β β
β User: john@example.com β
β β
β [Cancel] [Delete] β
β β
ββββββββββββββββββββββββββββββββββββββββββ
Warning: Deletion is permanent and cannot be undone
Effects:
- User account completely removed from database
- User can no longer login
- User's API keys become inaccessible (if future feature added)
- User cannot recover their account
All passwords are hashed using bcrypt with:
- Algorithm: bcrypt (PHP's
password_hash()) - Cost: 12 (default)
- Verification:
password_verify()or Laravel'sHash::check()
Never Stored:
- Plain text passwords
- Encrypted passwords
- Passwords in logs
- Passwords in error messages
Laravel sessions are:
- Encrypted - AES-256-CBC encryption
- Signed - HMAC-SHA256 signature for tampering detection
- Secure Cookie -
secureflag set (HTTPS only in production) - HttpOnly - Prevents JavaScript access to session cookie
- SameSite=strict - Prevents CSRF attacks
Session Expiration:
- Default: 2 hours of inactivity
- Configurable in
config/session.php
Every POST request (login, profile update) includes:
@csrftoken in form (Blade)- Token verified by middleware before processing
- Prevents cross-site request forgery attacks
Consider adding in production:
Route::post('/login', [LoginController::class, 'store'])
->middleware('throttle:5,15'); // 5 attempts per 15 minutes per IPAll authentication pages are fully internationalized in French, English, and German.
Login Page (auth.login.*):
auth.login.title β Page title
auth.login.email β Email label
auth.login.password β Password label
auth.login.remember β Remember me checkbox
auth.login.button β Submit button text
auth.login.no_account β Sign up link text
Profile Page (auth.profile.*):
auth.profile.title β Page title
auth.profile.edit_profile β Section heading
auth.profile.name β Name field label
auth.profile.email β Email field label
auth.profile.change_password β Section heading
auth.profile.current_password β Field label
auth.profile.new_password β Field label
auth.profile.confirm_password β Field label
auth.profile.save β Save button text
Validation Messages (auth.validation.*):
auth.validation.email_required β Email required error
auth.validation.email_invalid β Invalid email format error
auth.validation.password_required β Password required error
auth.validation.password_min β Password too short error
auth.validation.name_required β Name required error
Click the language button (F/EN/DE) in navbar to switch languages immediately.
Language preference is saved in session and persists across pages.
Symptom: "Invalid email or password" message, but credentials seem correct
Solutions:
- Verify email is spelled correctly (case-insensitive)
- Reset password via admin panel and try new password
- Check if account is deleted (verify in
/admin/resources/users) - Check application logs:
tail -f storage/logs/laravel.log
Symptom: Form submits but password doesn't change
Solutions:
- Verify current password field is correct
- Verify new password is at least 8 characters
- Verify password confirmation matches new password
- Check form validation errors displayed inline
- Clear browser cache and try again
Symptom: Redirected back to profile after login
Solutions:
-
Verify user
is_adminis set totruein database:php artisan tinker >>> User::where('email', 'user@example.com')->first()->is_admin
-
Set user as admin from existing admin account via
/admin/resources/users -
Or via tinker:
>>> $user = User::where('email', 'user@example.com')->first(); >>> $user->update(['is_admin' => true]);
Symptom: Gets logged out after closing browser despite checking "Remember me"
Note: Current implementation does not use "Remember me" feature. Session ends when browser is closed.
Future: Can be implemented with API tokens or persistent login cookies.
Symptom: Gets logged out after 2 hours of activity
Solution: This is by design for security. Adjust in config/session.php:
'lifetime' => env('SESSION_LIFETIME', 120), // minutesSet to higher value (e.g., 1440 for 24 hours) for longer sessions.
The public authentication system can be extended with:
- API Tokens - Allow users to generate tokens for API access
- OAuth2 - Social login via Google, GitHub, etc.
- Two-Factor Authentication - TOTP/SMS based 2FA
- Email Verification - Require email verification on signup
- Password Reset - Self-service password recovery
- User Registration - Allow public signup with admin approval
See README.md for overview of Filament user management and role-based access.
See MULTILINGUAL.md for i18n keys used in authentication pages.
Last Updated: 2026-04-10 Version: 2.0.0 Status: β Production Ready