© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
thenaquad

Can't login with the custom guard

Laravel v10.23.0
Filament v3.0.48
Caches cleared, cookies cleared. Session driver is file, I've also tried redis but no luck.

When I try to login I'm being kicked back to the login page. There are no errors in the log or browser console, no flash messages.
In the debugger I see that the login is successful (Pages\Auth\Login::authenticate logs in the user), but the user is not persisted in the session.

How do I troubleshoot?

The setup:

// auth.php
    'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],
    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
        'admin' => [
            'driver' => 'session',
            'provider' => 'admins',
        ],
    ],
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
        'admins' => [
            'driver' => 'eloquent',
            'model' => App\Models\Admin::class,
        ],
    ]
// AdminPanelProvider.php
    public function panel(Panel $panel): Panel
    {
        return $panel->
               // ...
               authGuard('admin')->
               // everything else including the middleware is default
    }
// auth.php
    'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],
    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
        'admin' => [
            'driver' => 'session',
            'provider' => 'admins',
        ],
    ],
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
        'admins' => [
            'driver' => 'eloquent',
            'model' => App\Models\Admin::class,
        ],
    ]
// AdminPanelProvider.php
    public function panel(Panel $panel): Panel
    {
        return $panel->
               // ...
               authGuard('admin')->
               // everything else including the middleware is default
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Export with custom guard
FilamentFFilament / ❓┊help
3y ago
I can't login with the authMiddleware
FilamentFFilament / ❓┊help
5mo ago
Testing custom auth guard
FilamentFFilament / ❓┊help
2y ago
Action with custom login
FilamentFFilament / ❓┊help
8mo ago