1
我想在我的Sylius商店中添加社交连接按钮,但我无法做到这一点。 我通过作曲家安装HWIOAuthBundle:为商店用户配置OAuth2访问
$ 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的文档非常简短,甚至通过在提交评论中搜索,我无法找到任何线索。
感谢您的帮助!
是否有人对如何HWIOAuthBundle融入Sylius一个简单的指南? – Gontran