问题描述
我在主 config.yml
中将会话设置为在浏览器关闭时过期:
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".
如何设置 Symfony2 应用程序在用户关闭浏览器时使 cookie 过期,但如果在登录时选择(通过选中记住我")则保留它们?
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?
我使用的是 Symfony2- RC3.
I'm using Symfony2- RC3.
推荐答案
我不确定 Beta 5 什么时候出来,但是这篇文章 http://fossplanet.com/f6/%5Bsymfony-devs%5D-remember-me-authentication-67998/ 倾向于它要么不工作,要么工作不正常.你试过在测试组提问吗?
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?
这篇关于如何让“记住我"如果会话在浏览器关闭时过期,是否工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!