Closed bernhardh closed 11 months ago
See discord discussion as a ref: https://discord.com/channels/883083792112300104/1154454720354713630
Hey @bernhardh! We're sorry to hear that you've hit this issue. 💛
However, it doesn't look like you've provided much information on how to replicate the issue. Please edit your original post with clear steps we need to take.
It is because the session is invalidated and the token is regenerated. This invalidates all other auth state. I don't think there is anything we can do to avoid this.
There is actually a way around this (which I've implemented in one of my own non-Filament projects). After the session has been regenerated, we could dispatch an event to the front end which sets the new CSRF token.
Package
filament/filament
Package Version
v3.0.89
Laravel Version
v10.30.1
Livewire Version
v3.1.0
PHP Version
8.1.25
Problem description
When creating 2 panels, which both have their own auth guard, you can separatly login to them (which is expected), but a click on logout in one panel results in a logout in all panels.
Expected behavior
After login in panel1, I want to stay logged in in panel2
Steps to reproduce
TLDR:
Use me demo repo's branch "issue/multi-logout".
Sidenotes
This issue is only when having the panel on the same domain/host. When using subdomains, it works logging out separately.
Long story
You can find everything in the dead simple repository. To sum up:
I created a fresh new project and added two panels: admin and partners with make-command. I added a new auth guard
partner
:and set it as authGuard to the partner panel:
Reproduction repository
https://github.com/bernhardh/test-filament-multi/tree/issue/multi-logout
Relevant log output
There is no logoutput.