Coola
1 week ago

Timed sessions in Laravel 7

Posted 1 week ago by Coola

Is there a way to place a timer on the user session for e.g. 2 h limit, and automatically ask the user to login again once the timer expires? This is regardless of "last activity", so the timer starts from the moment they login. Also to show a countdown clock of how many minutes left in the session?

To add: I have looked at the documentation for storing data into session, where I could possibly save the login time upon authentication. But I am not sure where to put this (and how). I could possibly then retrieve it from the session as well.

Please sign in or create an account to participate in this conversation.