Multi-factor authentication
Introduction
Users in Filament can sign in with their email address and password by default. However, you can enable multi-factor authentication (MFA) to add an extra layer of security to your users' accounts.
When MFA is enabled, users must perform an extra step before they are authenticated and have access to the application.
Filament includes two methods of MFA which you can enable out of the box:
- App authentication uses a Google Authenticator-compatible app (such as the Google Authenticator, Authy, or Microsoft Authenticator apps) to generate a time-based one-time password (TOTP) that is used to verify the user.
- Email authentication sends a one-time code to the user's email address, which they must enter to verify their identity.
In Filament, users set up multi-factor authentication from their profile page. If you use Filament's profile page feature, setting up multi-factor authentication will automatically add the correct UI elements to the profile page:
use Filament\Panel;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->profile();
}