Remember Me functionality not working in Symfony2

前端 未结 10 1373
鱼传尺愫
鱼传尺愫 2020-12-14 21:44

I have implemented remember me functionality in Symfony2. When I log in with remember me box checked, cookie named \"REMEMBERME\" gets created. That cookie is also available

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 21:59

    I had this problem and the issue was that I did not use single quotation marks in the property key of remember_me section (security.yml).

    Change this:

    remember_me:
        key:      qwerty
        lifetime: 604800
        path:     /
        domain:   ~
    

    to this:

    remember_me:
        key:      'qwerty'
        lifetime: 604800
        path:     /
        domain:   ~
    


    You can check it in the symfony documentation:
    http://symfony.com/doc/2.7/cookbook/security/remember_me.html

提交回复
热议问题