GoldenBro
GoldenBro
FFilament
Created by GoldenBro on 9/30/2024 in #❓┊help
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
4 replies
FFilament
Created by GoldenBro on 9/29/2024 in #❓┊help
Multi Guard
Hello, I am encountering an issue in my Laravel project where I have two separate authentication systems — one for regular users and one for administrators via the Filament admin panel. Both use the same database, and it seems that the sessions are overlapping. Problem description: Example 1: When the administrator logs out of the admin panel, the current user session on the main site is also terminated. The administrator is authenticated via the admin guard, and the user is authenticated via the web guard. After the admin logs out, the regular user is also logged out from their session on the main site. Example 2: When the user logs out from the main site, the administrator is also logged out of the admin panel. The user logs in through the web guard, and the admin logs in through the admin guard. When the user logs out, the admin session is also terminated, although they should function independently. Suspected cause: It seems that both systems are sharing the same session or cookie, causing a conflict. I have attempted to configure separate guards for users and admins, but the sessions still overlap. I would appreciate assistance in properly configuring the system so that logging out from one session (admin or user) does not affect the other. Thank you in advance for your help! https://github.com/DanielCodeWeb/FOTPROGLARAVEL3
2 replies