laravel breeze logout
I have laravel breeze installed. I created the guard customer. But when I logout as a customer the admin also logs out. How can I prevent this?
6 Replies
This route with middelware and guard is stored in routes\auth.php
When clicking on it the admin users also log out.
I am assuming the routes of the filament panel are stored somewhere in the system and I don't have to touch them
There’s only one authenticated user at a time per session, so if they log out then admin or customer isn’t relevant, that user is logged out.
So what is the solution? When there will be multiple users on the system, will there be just one session?
I think your use case of being logged in with TWO users at the same time is not correct fundamentally.
You either log in with one user, or with another. Then you log out, and then log in with another user.
So the behavior of the session is correct - logging out your user's session (both).
What do you mean by 'admin also logs out' ?
Have you got separate panels and guards ? If so, they should operate independently. But if you've only got one guard, then it will only be one user at any one time per session.
i have only one guard. in the filament panel the user "admin" also logs out when customer-user is logged out and vice versa. but like suggestions of some people here i understand the issue now. in future i will create another panel for other users of the filament panel. i hope it won't create new problems.