I am trying to implement the FOSOAuthServerBundle. I need it in order to create a centralized authentication function that will be shared by some other projects.
I followed the tutorial from here: Getting Started With FOSOAuthServerBundle
But I have a problem now: When trying to access the route auth.local/app_dev.php/oauth/v2/auth, I am getting the following error:
InvalidConfigurationException: The child node "providers" at path "security" must be configured.
Here is my security.yml:
security:
firewalls:
api:
pattern: /api
fos_oauth: true
stateless: true
oauth_authorize:
pattern: /oauth/v2/auth
form_login:
provider: fos_userbundle
check_path: /oauth/v2/auth_login_check
login_path: /oauth/v2/auth_login
anonymous: true
oauth_token:
pattern: /oauth/v2/token
security: false
access_control:
- { path: ^/oauth/v2/auth_login$, role: IS_AUTHENTICATED_ANONYMOUSLY }