thenaquad
thenaquad
FFilament
Created by thenaquad on 9/13/2023 in #❓┊help
Expandable table row
No description
2 replies
FFilament
Created by thenaquad on 9/13/2023 in #❓┊help
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
}
9 replies