© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
1 reply
Sjoerd

emailVerification redirects to login

After clicking the link in the mail for email verification the user gets instantly redirected to the login page. I can't find out why this is happening, maybe a config issue which I haven't found in the docs. Already spent quite some hours on solving this, hope someone can help me out.

My panel config I believe is quite basic and I have added
emailVerification()
emailVerification()


  return $panel
    ->default()
    ->id('admin')
    ->path('admin')
    ->emailVerification()
    ->passwordReset()
    ->login()
    ->profile()
    ->colors([
        'primary' => Color::Violet,
    ])
    ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
    ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
    ->pages([
        Pages\Dashboard::class,
    ])
    ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
    ->widgets([
        Widgets\AccountWidget::class,
        Widgets\FilamentInfoWidget::class,
    ])
    ->middleware([
        EncryptCookies::class,
        AddQueuedCookiesToResponse::class,
        StartSession::class,
        AuthenticateSession::class,
        ShareErrorsFromSession::class,
        VerifyCsrfToken::class,
        SubstituteBindings::class,
        DisableBladeIconComponents::class,
        DispatchServingFilamentEvent::class,
    ])
    ->authMiddleware([
        Authenticate::class,
    ]);
  return $panel
    ->default()
    ->id('admin')
    ->path('admin')
    ->emailVerification()
    ->passwordReset()
    ->login()
    ->profile()
    ->colors([
        'primary' => Color::Violet,
    ])
    ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
    ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
    ->pages([
        Pages\Dashboard::class,
    ])
    ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
    ->widgets([
        Widgets\AccountWidget::class,
        Widgets\FilamentInfoWidget::class,
    ])
    ->middleware([
        EncryptCookies::class,
        AddQueuedCookiesToResponse::class,
        StartSession::class,
        AuthenticateSession::class,
        ShareErrorsFromSession::class,
        VerifyCsrfToken::class,
        SubstituteBindings::class,
        DisableBladeIconComponents::class,
        DispatchServingFilamentEvent::class,
    ])
    ->authMiddleware([
        Authenticate::class,
    ]);


To send the verification email I have created a Listener, which may not be best practice?

$notification = app(VerifyEmail::class);
$notification->url = Filament::getVerifyEmailUrl($user);

$user->notify($notification);
$notification = app(VerifyEmail::class);
$notification->url = Filament::getVerifyEmailUrl($user);

$user->notify($notification);


My User class:

class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
    use CanResetPassword, HasFactory, Notifiable;
    ...
class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
    use CanResetPassword, HasFactory, Notifiable;
    ...


The email is sent and I can click the link in it after which it redirects to login. Any suggestion would be greatly appreciated!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Too Many Redirects after login
FilamentFFilament / ❓┊help
2y ago
emailVerification with Tenant panel problem.
FilamentFFilament / ❓┊help
2y ago
Redirects
FilamentFFilament / ❓┊help
3y ago
Anyone got a custom emailverification example?
FilamentFFilament / ❓┊help
13mo ago