PHP-OAuth2 icon indicating copy to clipboard operation
PHP-OAuth2 copied to clipboard

Fatal Error When Using bshaffer/oauth2-server-php 1.7 and above

Open aimitservicesdev opened this issue 9 years ago • 1 comments

Recently updated my project through composer and OAuth2 started failing when requesting the access token.

Here's the code: $tokeninfo = $client->getAccessToken($this->BASE_URL . $this->TOKEN_URL, 'authorization_code', array('code' => $code,'redirect_uri' => SITE_URL . "/externallogin/" . $this->organization_id));

Here's the error: PHP Catchable fatal error: Argument 1 passed to OAuth2\GrantType\AuthorizationCode::__construct() must be an instance of OAuth2\Storage\AuthorizationCodeInterface, none given, called in vendor/adoy/oauth2/src/OAuth2/Client.php on line 220 and defined in vendor/bshaffer/oauth2-server-php/src/OAuth2/GrantType/AuthorizationCode.php on line 22

Downgrading to version 1.6 fixes the issue.

aimitservicesdev avatar Oct 28 '15 17:10 aimitservicesdev

This seems to still be broken. Downgrading to 1.6 isn't working for me?

steveathon avatar Jul 09 '16 12:07 steveathon