filamentphp/filament · error · LogicException
The user model must implement the [Filament\Auth\MultiFactor
Error message
The user model must implement the [Filament\Auth\MultiFactor\Email\Contracts\HasEmailAuthentication] interface to use email authentication.
What it means
Error "The user model must implement the [Filament\Auth\MultiFactor\Email\Contracts\HasEmailAuthentication] interface to use email authentication." thrown in filamentphp/filament.
Source
Thrown at packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php:53
public static function make(): static
{
return app(static::class);
}
public function getId(): string
{
return 'email_code';
}
public function getLoginFormLabel(): string
{
return __('filament-panels::auth/multi-factor/email/provider.login_form.label');
}
public function isEnabled(Authenticatable $user): bool
{
if (! ($user instanceof HasEmailAuthentication)) {
throw new LogicException('The user model must implement the [' . HasEmailAuthentication::class . '] interface to use email authentication.');
}
return $user->hasEmailAuthentication();
}
public function sendCode(HasEmailAuthentication $user): bool
{
if (! ($user instanceof Model)) {
throw new LogicException('The [' . $user::class . '] class must be an instance of [' . Model::class . '] to use email authentication.');
}
if (! method_exists($user, 'notify')) {
$userClass = $user::class;
throw new LogicException("Model [{$userClass}] does not have a [notify()] method.");
}
$rateLimitingKey = "filament-email-authentication:{$user->getKey()}";View on GitHub (pinned to 53483fa934)
When it happens
Trigger: Thrown at packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17).
Data as JSON: /api/errors/dca5d3deededc405.
Report an issue: GitHub.