mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fixed getUser
This commit is contained in:
parent
7d89b02f6e
commit
72c2724cee
1 changed files with 12 additions and 1 deletions
|
|
@ -41,6 +41,17 @@ class Yahoo extends OAuth
|
||||||
return 'yahoo';
|
return 'yahoo';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $state
|
||||||
|
*
|
||||||
|
* @return json
|
||||||
|
*/
|
||||||
|
public function parseState(string $state)
|
||||||
|
{
|
||||||
|
return json_decode(html_entity_decode($state), true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
@ -143,7 +154,7 @@ class Yahoo extends OAuth
|
||||||
{
|
{
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
$this->user = json_decode($this->request('GET',
|
$this->user = json_decode($this->request('GET',
|
||||||
$this->resourceEndpoint, ['Authorization: Bearer '.urlencode($accessToken)]), true)['data']['0'];
|
$this->resourceEndpoint, ['Authorization: Bearer '.urlencode($accessToken)]), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->user;
|
return $this->user;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue