【发布时间】:2019-11-13 18:36:15
【问题描述】:
我正在尝试实现用户登录历史记录并允许用户从特定设备注销
我使用SESSION_DRIVER=database 并在数据库中有sessions 表
根据laravel documentation
我有user_logins 具有以下结构的表:
session_id |user_id | ip_address |用户代理 |浏览器名称 | 位置 |登录名 | is_active
我完全能够使用UserEventSubscriberhandleUserLogin函数将上述信息存储在表user_logins中
现在我想从特定设备上注销用户,该怎么做?
我可以使用ip_address 和user_agent 从user_logins 表中删除条目,但我也想从特定设备上注销该用户。
请大家帮我解决这个问题。
【问题讨论】:
标签: laravel session authentication logout laravel-5.7