Closed BurpyDelivers closed 6 years ago
What version of Laravel and Passport are you using?
I have the same problem, it is in Laravel\Passport\ClientRepository.
public function find($id)
{
return Passport::client()->where('id', $id)->first();
}
When I change it to Passport::client()->find($id)->first(); it works.
This is an issue with Laravel Passport 6. A change introduced in https://github.com/laravel/passport/pull/715 hardcoded the ID field as id
. A change to fix that issue has been merged in https://github.com/laravel/passport/pull/745 but a new version of Passport hasn't been tagged since then.
As a work around you could update your composer.json
file to constrain passport to commit a3a1c5d3c2aa1635dd2c01063b7b0fff7225b88b
Thanks @robbytaylor
It's been merged into laravel/passport 6.0.3. No need for a workaround. Thx!
When I am trying to generate token for a user (oath/token), it always say invalid clientid, it is not able to pick _id as id, when I am adding a field id with the same value in the "oauth_clients" collection it works. Please suggest.