How to make “remember me” work if session expires when browser is closed?

僤鯓⒐⒋嵵緔 提交于 2019-12-08 15:51:54

问题


I set sessions to expire when browser closes in main config.yml:

framework:
    session:
        default_locale: %locale%
        lifetime:       0
        auto_start:     true

Then I set "remember me" for login page as described in documentation and I'm getting logged out (when I restart browser) even if I check "remember me".

How to set a Symfony2 application to expire cookies when user closes browser, but persist them if one chooses to (by checking "remember me") upon login?

I'm using Symfony2-beta5 RC1 RC3.


回答1:


I'm not sure when Beta 5 came out, but this post http://fossplanet.com/f6/%5Bsymfony-devs%5D-remember-me-authentication-67998/ leans towards it either not working, or not working right. Have you tried asking in the beta group?



来源:https://stackoverflow.com/questions/6470994/how-to-make-remember-me-work-if-session-expires-when-browser-is-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!