Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Guard #14389

Open
DanielCodeWeb opened this issue Sep 29, 2024 · 0 comments
Open

Multi Guard #14389

DanielCodeWeb opened this issue Sep 29, 2024 · 0 comments
Labels

Comments

@DanielCodeWeb
Copy link

DanielCodeWeb commented Sep 29, 2024

Package

filament/filament

Package Version

3.2

Laravel Version

11

Livewire Version

3.5

PHP Version

8.3.0

Problem description

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:

Expected behavior

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.

Steps to reproduce

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!

Reproduction repository (issue will be closed if this is not valid)

https://github.com/DanielCodeWeb/FOTPROGLARAVEL3

Relevant log output

No response

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant