You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ( ! class_exists($grantPath)) {
throw new \InvalidArgumentException('Unknown grant "'.$grant.'"');
}
$grantObj = new $grantPath;
} elseif ( ! $grant instanceof Grant\GrantInterface) {
throw new \InvalidArgumentException($grant.' is not an instance of \OAuth2\Client\Grant\GrantInterface');
}
$defaultParams = array(
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
'redirect_uri' => $this->redirectUri,
'grant_type' => $grant,
);
....
return $grantObj->handleResponse($result);
This is my fix. The problem is the pass in $grant get override by the class path, then become the grant object. Then the grant object assigned to $defaultParams, which fail the whole process. I changed the code to keep original $grant untouched. And use $grantPath for class path. And $grantObj for grant object.
The text was updated successfully, but these errors were encountered:
getAccessToken($grant = 'authorization_code', $params = array())
{
if (is_string($grant)) {
$grantPath = 'League\OAuth2\Client\Grant'.ucfirst(str_replace('_', '', $grant));
....
return $grantObj->handleResponse($result);
This is my fix. The problem is the pass in $grant get override by the class path, then become the grant object. Then the grant object assigned to $defaultParams, which fail the whole process. I changed the code to keep original $grant untouched. And use $grantPath for class path. And $grantObj for grant object.
The text was updated successfully, but these errors were encountered: