I have a simfony project where the user can log in.
My goal is to start the session for the user when he login.
Then, if the user refresh the page, the session lifetime will be reset to the max value, if not, once the lifetime expires, the session will be closed.
I set the session time to 10 sec in the config.yml and the auto start to false. The session starts correctly when the user login, but expires after 10sec even if the page is refreshed.
How can I reset the lifetime when the page is refreshed or changed?
Thank you very much.
PS. Here is my config.yml
session:
default_locale: %locale%
lifetime: 10
auto_start: false
I realized that the session time is managed by the server when creating the coockie. With the symfony’s lifetime, we can owerride the global life time of the session.