Closed nimasdj closed 6 years ago
the firewall will automatically know this, you shouldn't have to do anything except configure the firewall to accept the remember me token
I did read https://silex.symfony.com/doc/2.0/providers/remember_me.html and here is my code. I expected a cookie will be set, but I see no REMEMBERME cookie in developper tool. What wrong I did?
$app = new Silex\Application();
$app->register(new Silex\Provider\SecurityServiceProvider());
$app->register(new Silex\Provider\RememberMeServiceProvider());
$app['security.firewalls'] = array(
'my-firewall' => array(
'pattern' => '^/secure$',
'remember_me' => array(
'key' => 'Choose_A_Unique_Random_Key',
'always_remember_me' => true,
/* Other options */
),
),
);
Closing as support should be done on StackOverflow instead.
I am confused with remember me, when the cookie is set, then what to do when user is coming back in order to authenticate them? How to validate the cookie value or what should I do? _username and _password is a condition that remember me recognizes them to automatically allow user?