when i using passport package After doing this,
$success['token'] = $users->createToken('MyApp')->accessToken;
I'll deal with error in this code :
protected function createRequest($client, $userId, array $scopes)
{
return (new ServerRequest)->withParsedBody([
'grant_type' => 'personal_access',
'client_id' => $client->id,
'client_secret' => $client->secret,
'user_id' => $userId,
'scope' => implode(' ', $scopes),
]);
}
text of error :
Trying to get property 'id' of non-object
why clinet variabale has null ??
I had the same issue when i upgraded to ^3.0. I ran php artisan passport:install --force to regenerate keys and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With