1

我在网络上关注了一些关于如何在用户登录时配置记住我选项 [FOSBundle] 的教程,但似乎没有什么对我有用:

main:

            form_login:
                login_path: fos_user_security_login
                check_path: fos_user_security_check
                provider: fos_userbundle
                post_only: true
                use_forward: false
                remember_me:  true
                username_parameter:             email
                password_parameter:             password
                failure_path:                   null
                failure_forward:                false
                target_path_parameter: redirect_url
                default_target_path: /index
            logout:
                path:   /logout
                target: /blog
            remember_me:
                key:    %secret% 
                always_remember_me: true
                remember_me_parameter: _remember_me
                lifetime: 31536000 # 365 days in seconds
                path:     /
                domain:   ~
4

0 回答 0