I've been fighting the whole day with HWIOAuthBundle, and I just can't get it do what I need.
I want oauth-only login, so no form login, no registration, everything goes through oauth. I want to create new user accounts automatically on their first login with the profile data I get from oauth. I want to not use FOS UserBundle, because I don't see what functionality it offers me that I really need in my scenario (I'm using it in other projects).
Now I implemented my own User Provider, inheriting from the included EntityUserProvider, I throw exceptions in every method just to see where the heck it's getting the user data from, and none of them gets triggered.
So I officially give up and ask the community for help. Here are my configs:
security:
providers:
oauth:
id: campfire.user_provider
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
secured_area:
anonymous: ~
oauth:
resource_owners:
facebook: "/login/check-facebook"
google: "/login/check-google"
login_path: /login/
use_forward: false
failure_path: /login/
oauth_user_provider:
oauth: ~
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
services:
campfire.user_provider:
class: CampfireBundle\Security\OAuthUserProvider
arguments: ["@doctrine", CampfireBundle\Entity\Author, {facebook: facebook_id, google: google_id}]
config.yml is set up according to the docs, not posting it because it contains my client IDs and secrets.
What am I doing wrong that it's apparently not even calling my User Provider?