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
GitHub
GitHub - DanielCodeWeb/FOTPROGLARAVEL3
Contribute to DanielCodeWeb/FOTPROGLARAVEL3 development by creating an account on GitHub.
1 Reply
Sidji
Sidji4w ago
can I see youR auth config?
Want results from more Discord servers?
Add your server