anonymouse703's avatar

How to avoid multiple login on user?

The user will login on admin side, How to avoid user account multiple login? Do I need to used middleware for login only?

Case: One account one device policy

I'm using Laravel-Filament v4 with Jetsream

0 likes
2 replies
jlrdw's avatar

Apply authorization, an admin for example is also a user.

I have an app where one bookkeeper is also an admin, yet another bookkeeper is not an admin, so I use a combination of checking roles and authorization.

A user either can or cannot do something.

anonymouse703's avatar

what I mean is the user cannot login multiple devices at once.. example in mobile A the user is currently login and on same time he wants to login in mobile B so on the mobile A when he browse it will be logout

I tried the session table but the senior dev to revised it since the session driver is updated to redis.. I found this in doc https://laravel.com/docs/12.x/authentication#invalidating-sessions-on-other-devices

But when I apply it in listener I got this The given password does not match the current password.

This is the listener

so why listener an not middleware? because I only need to logout the user's other device on login

Please or to participate in this conversation.