就在最近我注意到Symfony在闲置几分钟时将我从我的应用程序中注销。这很奇怪,因为当我第一次刷新屏幕时,看起来我仍然登录,但是当我第二次刷新它重定向到登录表单时。为了防止我添加"生命周期"但参数似乎被忽略了。您能否提供解决此问题的最佳做法?
firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
default_target_path: /
# if you are using Symfony < 2.8, use the following config instead:
# csrf_provider: form.csrf_provider
logout: true
anonymous: true
remember_me:
secret: '%secret%'
lifetime: 604800 # 1 week in seconds
path: /
# by default, the feature is enabled by checking a
# checkbox in the login form (see below), uncomment the
# following line to always enable it.
#always_remember_me: true