dev tech
dev tech

Reputation: 21

Laravel 8 passport OAuth api "error": "invalid_client",

i try to test oauth on passport using laravel 8 but it gave me this error:

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

this is screen shot of passport

enter image description here

Upvotes: 2

Views: 8952

Answers (3)

Elliot
Elliot

Reputation: 1616

Also just facing this issue - remember to ensure your callback URLs are correct (which in my case meant running valet secure because I'd specified https and it wasn't!)

Big rabbit hole, because of course everything else looks correct, and this is automatic.

Upvotes: 0

Hasan Baig
Hasan Baig

Reputation: 511

I was also facing the same error in one of my project on which I was working on, and just by googling I came to this post. I also tried the proposed answer but it wasn't work for me so I gone through with given parameters. My use case was a bit different in which I was on password authorized screen and facing the same error as you have. I was just passing the data in query string. So I just matched my query string data with the one I have in the database and my issue is resolved now. Try this in your case as well and hoping your issue will also fixed. This error is less or more depending upon the posted data.

Upvotes: 0

runtimeTerror
runtimeTerror

Reputation: 426

So, if you are working with Passport, make sure you have followed the steps mentioned in the documentation. Looks like you have missed the publishing of the keys from passport config php artisan vendor:publish --tag=passport-config. Once again if it is a fresh installation, you just need to follow the steps mentioned in the documentation to setup Passport and it works like a charm!

Upvotes: 0

Related Questions