I am trying to work on HWIOAuthBundle(https://github.com/hwi/HWIOAuthBundle).
I get an error as
The service definition "my.oauth_aware.user_provider.service" does not exist.
In HWIOAuthBundle(https://github.com/hwi/HWIOAuthBundle/blob/be4a916fba81967ecc28c4634d255acc33e4157e/Resources/doc/3-configuring_the_security_layer.md#b-configure-the-oauth-firewall) documentation. It is given
- Code: Select all
oauth_user_provider:
service: my.oauth_aware.user_provider.service
I follow the same code described in link.
What will be service provider here to work with facebook, twitter etc?
Code
In app/config/config.yml
- Code: Select all
hwi_oauth:
# configuration of oauth resource owners to use
resource_owners:
fb:
type: facebook
client_id: XXXXXXXXXX
client_secret: XXXXXXXXXXXXXXXXXXX
scope: ""
# name of the firewall the oauth bundle is active in
firewall_name: secured_area
In app/config/security.yml
- Code: Select all
security:
firewalls:
oauth:
resource_owners:
facebook: "/login/check-facebook"
google: "/login/check-google"
my_custom_provider: "/login/check-custom"
my_github: "/login/check-github"
login_path: /login
failure_path: /login
oauth_user_provider:
service: my.oauth_aware.user_provider.service
