I am trying to integrate HWIOAuthBundle
in my Symfony 4.1
application.
I followed the documentation regarding the installation of the bundle. Here are snippets of my configuration files:
# config/packages/hwi_oauth.yaml
hwi_oauth:
# list of names of the firewalls in which this bundle is active, this setting MUST be set
firewall_names: [secured_area]
# https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/2-configuring_resource_owners.md
resource_owners:
google:
type: google
client_id: '%env(GOOGLE_AUTH_ID)%'
client_secret: '%env(GOOGLE_AUTH_SECRET)%'
scope: "email"
options:
display: popup
csrf: true
# config/services.yaml
services:
hwi_oauth.resource_ownermap.secured_area:
class: HWI\Bundle\OAuthBundle\Security\Http\ResourceOwnerMap
# config/security.yml
security:
firewalls:
secured_area:
anonymous: ~
oauth:
resource_owners:
google: "/login/check-google"
login_path: "/login"
use_forward: false
failure_path: "/login"
oauth_user_provider:
service: hwi_oauth.user.provider
However when I run
composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle
I get the following error:
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In CheckExceptionOnInvalidReferenceBehaviorPass.php line 31:
!!
!! The service "hwi_oauth.security.oauth_utils" has a dependency on a non-exis
!! tent service "hwi_oauth.resource_ownermap.secured_area".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd
What am I doing wrong?