FOSOAuthServerBundle and custom authentication provider
问题 Edit: Found the error. There is a tiny little peace of code in \vendor\friendsofsymfony\oauth-server-bundle\FOS\OAuthServerBundle\Resources\config\oauth.xml which says: <argument type="service" id="fos_oauth_server.user_provider" on-invalid="null" /> So when your service definition in config.yml is wrong or just a typo (from the original docs) If you're authenticating users, don't forget to set the user provider. Here's an example using the FOSUserBundle user provider: # app/config/config.yml