GrahamMorbyDev's avatar

invalid_client - Lumen Passport

I have installed Lumen Passport using the method outlined in the below URL:

https://medium.com/@yomiomotoso/integrating-laravel-passport-in-your-lumen-project-with-example-1c2b8719c30

I have gone through most of the steps and they all work until I get to log in and get an OAuth/token. I'm sending the client secret and client_id generated by the passport install as well as the username and password and the return I'm getting is

{
    "error": "invalid_client",
    "error_description": "Client authentication failed",
    "message": "Client authentication failed"
}

The URL im hitting is

/v1/oauth/token

I'm guessing this is a part of passport and I'm not sure which code to share with you, so any help would be welcomed

0 likes
2 replies
GrahamMorbyDev's avatar

Ok here is an update

The data im sending is

{
    "grant_type": "password",
    "client_id": 2,
    "client_secret": "pqvuOJXddWqy7uT3jLRsYqgJfFDCabY0Cjw7rvbH",
    "password": "password",
    "username": "[email protected]"
    "scope": ""
}

The client ids are for test only, they are the Password Grant Client details and I'm getting a return error of

{
    "error": "unsupported_grant_type",
    "error_description": "The authorization grant type is not supported by the authorization server.",
    "hint": "Check that all required parameters have been provided",
    "message": "The authorization grant type is not supported by the authorization server."
}
GrahamMorbyDev's avatar
GrahamMorbyDev
OP
Best Answer
Level 4

So I found that

setting the header to

content-type: application/json seemed to fix the issue

Please or to participate in this conversation.