I'm integrating FOSOAuthServerBundle to handle login from a mobile app to a Symfony2 backoffice. I've followed the instructions of this answer, but as I've never used OAuth2
before I'm a bit lost sometimes.
I tried logging in using the 'password' grant_type
but for some reason it won't work unless I specify the client_secret
as a GET
parameter. Am I actually supposed to ?
Here's what my request looks like:
http://myserv.local/app_dev.php/oauth/v2/token
?client_id=1_4up4x3hpaask4g0sok0so8sg00gk48c44cc0wkwwsg8048wcog
&grant_type=password
&username=test@test.com
&password=somepassword
It returns this response unless the client_secret
parameter is added:
{"error":"invalid_client","error_description":"The client credentials are invalid"}