如何在 X 时间后自动注销用户?目前,即使用户在2天后回到他的计算机,该应用程序仍然绕过登录页面并给他授权
如果需要,需要查看会话空闲时间,以便在特定时间段后过期。
http://symfony.com/doc/current/components/http_foundation/session_configuration.html#session-idle-time-keep-alive
您需要修改您的 config.yml 文件
#app/config/config.yml
session:
// set your values here
cookie_lifetime: 86400
gc_maxlifetime: 18000
你想看看 cookie 的到期时间。看看 http://symfony.com/doc/current/components/http_foundation/session_configuration.html 并搜索cookie_lifetime
.听起来您可能希望将其设置为 0
,以便在用户关闭浏览器选项卡后过期。