Skip to main content

Introduction

Filament provides a complete authentication system out of the box, including login, registration, password reset, email verification, and multi-factor authentication. You can customize every aspect or integrate with your existing authentication.

Configuring authentication

Authentication guard

Specify which authentication guard to use:
This determines which guard from config/auth.php Filament uses.

Login page

Enable the login page:

Custom login page

Create a custom login page:
Extend the base login page:
Register it:

Registration page

Enable user registration:

Custom registration page

Create a custom registration page:

Password reset

Enable password reset functionality:

Password broker

Specify which password broker to use:

Email verification

Require users to verify their email:
Your user model must implement MustVerifyEmail:

Email change verification

Verify email changes:

Profile pages

Enable user profile management:

Custom profile page

Create a custom profile page:

Multi-factor authentication

Add two-factor authentication:

Requiring MFA

Make MFA mandatory for all users:

User model configuration

Implement the required contracts on your user model:

Authorization

Filament integrates with Laravel’s authorization system using policies.

Creating policies

Generate a policy for your model:
Define authorization methods:

Registering policies

Register policies in AuthServiceProvider:

Strict authorization

Require all resources and pages to implement authorization:
This throws an exception if a resource doesn’t have a policy.

Password visibility

Allow users to reveal password fields:

Customizing routes

Login route slug

Registration route slug

Password reset route slugs

Accessing the auth guard

Access the panel’s authentication guard:

Logout handling

The logout route is automatically registered. Customize the logout response:
Bind it in a service provider:

Custom authentication responses

You can customize all authentication responses: