Receiving 500 code error only.
pat22292 opened this issue · 6 comments
Before anything else, I've been using this package for almost 5 years and I thank you for that, then I tried it with lumen version 7 , .
public function login(Request $request)
{
$http = new \GuzzleHttp\Client;
try {
$response = $http->post(config('services.passport.login_endpoint'), [
'form_params' => [
'grant_type' => 'password',
'client_id' => config('services.passport.client_id'),
'client_secret' => config('services.passport.client_secret'),
'username' => $request->email,
'password' => $request->password,
'scope' => '*'
]
]);
return $response->getBody();
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
return $e->getCode();
}
}
Whenever I try to generate token with correct credentials, It is working just fine, but when Catching the errors, I noticed that I'm only getting 500 code? I included this as an issue because my previous projects doesn't give me any problem at all, just now.
{
"message": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",
"code": 10,
"status_code": 500
}
By the way, here's the response.