简体   繁体   中英

LogSuccessfulLogout Listener is not getting triggered when session idle timeout occurs (Laravel)

In config/session.php there is key 'lifetime' => 1 for session idle timeout. After exceeding this time when the user gets log out the Listener app/Listeners/LogSuccessfulLogout.php should be triggered. But unfortunately it's not getting triggered. Otherwise if I try to logout manually it works fine.

Session expiration after lifetime does not invoke logout method of controller. Servers keep session lifetime and the when a request with old session comes, create new session. So may a session expiration is 12:00. User has not send request from 11:00. Then at 14:00 send a request. So at 14:00 User logout. and before that time no operation is done.

I think to accomplish triggering logout listener, you can create scheduled or cron job when user login

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM