我想在我的Sylius商店添加社交连接按钮,但我无法做到这一点。 我通过composer安装了HWIOAuthBundle:
$ composer require hwi/oauth-bundle
然后,根据HWIOAuthBundle documentation,这是我的配置文件:
应用/配置/ routing.yml中
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
prefix: /connect
hwi_oauth_connect:
resource: "@HWIOAuthBundle/Resources/config/routing/connect.xml"
prefix: /connect
hwi_oauth_login:
resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
prefix: /login
facebook_login:
path: /login/check-facebook
应用/配置/ config.yml
hwi_oauth:
firewall_names: [secured_area]
resource_owners:
any_name:
type: facebook
client_id: <client_id>
client_secret: <client_secret>
options:
display: popup #dialog is optimized for popup window
auth_type: rerequest # Re-asking for Declined Permissions
应用/配置/ security.yml
firewalls:
secured_area:
anonymous: ~
oauth:
resource_owners:
facebook: "/login/check-facebook"
login_path: /login
use_forward: false
failure_path: /login
oauth_user_provider:
service: sylius.oauth.user_provider
当我启动服务器时,出现此错误:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "sylius.oauth.user_provider" has a dependency on a non-existent service "sylius.factory.admin_user_oauth".
你对如何解决它有任何想法吗? Sylius的文档非常简短,即使通过提交评论进行搜索,我也无法提供任何线索。
感谢您的帮助!