fkoessler
fkoessler

Reputation: 7257

change remember me cookie lifetime dynamically

I am using Symfony2 framework with FOSUserBundle. I want to change the remember cookie lifetime dynamically: when the user clicks on a link for example. So I can't just change the value for 'remember_me' in the security.yml file. I am browsing the Symfony2 API and found Symfony\Component\Security\Http\RememberMe but I can't find achieve my goal. Any suggestion?

Upvotes: 4

Views: 836

Answers (1)

jkucharovic
jkucharovic

Reputation: 4244

“Remember me” cookie is processed by class TokenBasedRememberMeServices. Create Event subscriber and call method onLoginSuccess from some event listener.

Upvotes: 1

Related Questions