How to Add "Remember Me" Login Functionality

// app/config/security.php
$container->loadFromExtension('security', array(
// ...

'firewalls' => array(
'main' => array(
// ...
'remember_me' => array(
'secret' => '%secret%',
'lifetime' => 604800, // 1 week in seconds
'path' => '/',
// by default, the feature is enabled by checking a
// checkbox in the login form (see below), uncomment
// the following line to always enable it.
//'always_remember_me' => true,
),
),
),
));
 
Back
Top