我想添加facebook登录选项到我的网站。我试着跟着this tutorial走。但是如果我在main部分下添加knpu_guard部件,我会得到这个错误:
Unrecognized option "knpu_guard" under "security.firewalls.main"我在security.yml中的firewalls部分如下所示:
firewalls:
main:
anonymous: ~
#pattern: ^/
provider: our_db_provider
form_login:
login_path: login
check_path: login
logout:
path: /logout
target: /
knpu_guard:
authenticators:
- app.form_login_authenticator
- app.api_token_authenticator
- app.facebook_authenticator
# by default, use the start() function from FormLoginAuthenticator
entry_point: app.form_login_authenticator我只是添加了knpu_guard部分,在firewalls部分下没有其他更改
发布于 2017-07-25 20:37:29
我认为这个教程有点过时了,因为knpu_guard不再被接受。
您可以在security.yml文件中使用guard作为密钥
试着用这个
form_login:
login_path: login
check_path: login
provider: user_provider #where is this provider? It shouldn't be fos_userbundle for example?
anonymous: truehttps://stackoverflow.com/questions/45303430
复制相似问题