passport: {"error":"invalid_client","message":"Client authentication failed"}
When passing form-data in postman, this works correctly:
{
"client_id": 3,
"client_token": "gOX9axBrBuFVEVUPGSzjKIUqH77Ta64TuVIbHrky",
"grant_type": "password",
"password": "password1",
"scope":"*",
"username":"tim.ogilvy@mywork.com"
}
as soon as I switch to passing “application/json” and pass exactly the same values as a json object in the body, I get this error.
{"error":"invalid_client","message":"Client authentication failed"}
Is the client id getting converted to a string somewhere in this process, and then failing to match? Definitely a bug with passport tho. changing the grant_type to “noodles” produces a different error:
{"error":"unsupported_grant_type","message":"The authorization grant type is not supported by the authorization server.","hint":"Check the `grant_type` parameter"}
I’m putting my money on this being a type comparison issue in passport somewhere, where either the client_id or the client_token is incorrectly cast or compared.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 15 (1 by maintainers)
@TimOgilvy There may be quite scenarios for the above issue.I will explain it one by one. You always need to pass application/json header .
I have tried different ways, in the end I notice that my config cache is old and I use this code and my problem solved
php artisan config:clear@ShekhSaifuddin007 I had kind of the same error, I solved it adding the parameters to the request create