Laravel: Logout/clear all sessions for all users from app

后端 未结 2 539
庸人自扰
庸人自扰 2020-12-11 05:27

The Problem

I want to clear all sessions for all users in my Laravel application.

What I have tried

I understan

相关标签:
2条回答
  • 2020-12-11 05:51

    in app/session.php you can change cookie value, so user will automatically logout because of cookie is not match with the config

    0 讨论(0)
  • It's worth noting that Laravel actually only stores active sessions in the session folder; those that are 'remembered' but haven't been actively accessing your application do not count among these sessions. As such, just deleting the files won't finish the job.

    You must also clear all Remember Tokens from the users table, as this token is used in conjunction with the local token stored in the cookie to re-create the session when a user reconnects.

    0 讨论(0)
提交回复
热议问题