How to extend session cookie lifetime in Symfony? How to extend session cookie lifetime in Symfony? symfony symfony

How to extend session cookie lifetime in Symfony?


You can change in the config.yml files under the session key, as example:

# session configurationsession:    cookie_lifetime:    3600

From the doc:

cookie_lifetime

type: integer default: null

This determines the lifetime of the session - in seconds. The default value - null - means that the session.cookie_lifetime value from php.ini will be used. Setting this value to 0 means the cookie is valid for the length of the browser session.

More info in the doc here