Auth session admin and user

There is a Laravel project. I have 2 authorizations, the usual one for the user and the filament admin. One user table is used for authorization. That is, if I log in under the admin data in the admin panel, then the script also authorizes the regular user. And if you exit the admin panel, then the user also leaves the usual one. That is, you need to somehow separate the admin and user session. I tried to change it through config auth and guard, but it didn't work out
2 Replies
toeknee
toeknee3mo ago
You can't really if using the same, what is it you are trying to achieve since they use the same auth anyway?
Matthew
Matthew3mo ago
It's not clear whether all admins are users, and some users are admins, or whether this is an impersonation type issue. If it is just some users are admins, and all admins are users, then its a permissions problem to solve, not a an auth one. If you want separate panels etc, then you need 2 auth guards, which you can have with one table, but it is usually the wrong solution.
Want results from more Discord servers?
Add your server