Laravel - destroy existing sessions on login

后端 未结 4 1055
臣服心动
臣服心动 2021-01-14 15:14

Is there a way to check if a user already has a valid session on a different machine?

What I want to do is when a user logs in, destroy an other sessions which they

4条回答
  •  攒了一身酷
    2021-01-14 15:48

    This may not be the best answer, but first thing that came to my mind was lowering the timeout on the session.

    In app->config->session.php there's a setting for both lifetime and expire_on_close (browser).

    I'd try looking into that for now, and see if someone else comes up with something better.

提交回复
热议问题