如何注销其他浏览器,并且在十月CMS中每个用户只能保持一个打开状态。
不使用插件
在Laravel中,这是通过实现的
Auth::logoutOtherDevices($password);
在LoginController中添加方法
use Illuminate\Support\Facades\Auth;
Auth::logoutOtherDevices($password);
内核中从行中删除评论
\Illuminate\Session\Middleware\AuthenticateSession::class,
就是这样,该功能现在已包含在Laravel中!
有关参考[https://www.amitmerchant.com/logout-from-everywhere-except-current-device-laravel/]
希望它的工作!!