I want to implement multi authentiation system in laravel 10, for both customer user as well admin can access site in same browser at a time in different window .
I have implemented multi auth using guard with two different tables 'admins' and 'users' but , still facing issue.
not able to persist both user login together.
Let's I am make login with Customer user and next when i am perform login with admin at that time customer user will be logout.
Code for config/auth.php file
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', User::class),
],
'admins' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', Admin::class),
],
],
Please look it and let me know solution if you found any issue.
Thanks for Advance !!