Symfony2 - HWI/OAuthBundle can't find user provider
Add to security.yml
providers: hwi: id: hwi_oauth.user.provider
or your custom user provider service
Above is almost correct. It should be added to security.yml not services.yml. See below for example in context.
providers: in_memory: memory: users: admin: { password: somesecretpassowrd, roles: 'ROLE_ADMIN' } hwi: id: hwi_oauth.user.provider
This exception appears when services.yml
is put below security.yml
in config.yml
. Apparently, hwi_oauth service has to be defined before it's going to be used in security providers. So the correct sequence of resources in config.yml
is supposed to be:
- { resource: services.yml } - { resource: security.yml }