I build this laravel app with jetsream and it is working like a charm. (I am not a developer, i just watch youtube videos and try to build what i want)
I want to prevent concurrent login from same account. I saw what i believe is the solution here: php laravel preventing multiple logins of a user from different devices/browser tabs at a given time. But i am not sure how to implement it.
For starters, the solution on the above link says to check and make sure that the following code is present in "app/Http/Kernel.php"
Illuminate\Session\Middleware\AuthenticateSession
I checked my Kernel.php file and found this line.
\Laravel\Jetstream\Http\Middleware\AuthenticateSession
Is this the line i need to have? Is it different because i use jetstream?
Then the solution said to use the code as follow:
use Illuminate\Support\Facades\Auth;
Auth::logoutOtherDevices($password);
Where do i use it? Where should i paste this code?
Note: i have found several articles on how to achieve what i want but they are too advance for me.
I have been stuck on this for the past 2 hours. Can anyone help me sort this one out.
Regards