Filament auth guard logout
I'm using two different guards for users (web) and admins (admin). For users, I can destroy the web guard session when logout. Since I use filament for admin panel, its custom logout destroys both web and admin guard sessions. How do I make it so that when admin logout it only destroy the admin guard.
6 Replies
Can anyone help me? Please 🙏
Ditch guards and use roles instead...
have you tried this in your panel config? https://filamentphp.com/docs/4.x/users/overview#setting-the-authentication-guard
Yes, I use ->authGuard('admin'). It works for login but logout destroy both web and admin sessions
according the controller it invalidates all the session
So my best bet is to create your own logout controller and modify to your needs
This could work. I will try it. Thank you for your response.