1
votes

Using doorkeeper with a client side gem for OAuth2 Resource Owner Password Credentials Flow

My request body is:

{
"grant_type": "password",
"username": "[email protected]",
"password": "sekret"
}

and endpoint for the POST is: localhost:8080/api/v1/oauth/token

I can get the grant_type: client_credentials to respond with a token...but the password param (which I need) responds with:

        <title>Action Controller: Exception caught</title>

Any ideas as to why? Using doorkeeper 4.0 with a rails angular app. Thanks!

1

1 Answers

0
votes

As per the RFC6749 section 2.3.1, your data should not be passed through a JSON object, but as body request (grant_type=password&username=test%40test.com&password=sekret) with application/x-www-form-urlencoded header.