mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fixed GitHub response parsing
This commit is contained in:
@@ -53,7 +53,7 @@ class Github extends OAuth2
|
||||
protected function getTokens(string $code): array
|
||||
{
|
||||
if(empty($this->tokens)) {
|
||||
$this->tokens = \json_decode($this->request(
|
||||
$response = $this->request(
|
||||
'POST',
|
||||
'https://github.com/login/oauth/access_token',
|
||||
[],
|
||||
@@ -63,7 +63,11 @@ class Github extends OAuth2
|
||||
'client_secret' => $this->appSecret,
|
||||
'code' => $code
|
||||
])
|
||||
), true);
|
||||
);
|
||||
|
||||
$output = [];
|
||||
\parse_str($response, $output);
|
||||
$this->tokens = $output;
|
||||
}
|
||||
|
||||
return $this->tokens;
|
||||
|
||||
Reference in New Issue
Block a user