Invalid Laravel login when user leaves page

It seems to be a small and easily solved problem, but I can not find any solution for it.

I want to log in for users of this session only while you are browsing the site. As soon as they close the tab, I want their session to expire. As far as I know, I cannot do this in an inline class Auth.

How can I do this efficiently?

+4
source share
2 answers

Short answer: YOU CAN'T

, , expire_on_close config/session.php ( , cookie , ):

'expire_on_close' => true,

, . , , JavasSript onbeforeunload, . , "", .


"" , , , , , , , .

+2

PHP , /, .

: PHP

0

Source: https://habr.com/ru/post/1616236/


All Articles