From 72c2724cee59ea1ef3bf3651bb92fa2094f62247 Mon Sep 17 00:00:00 2001 From: Armino Popp Date: Fri, 17 Jan 2020 20:48:46 +0200 Subject: [PATCH] Fixed getUser --- src/Auth/OAuth/Yahoo.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Auth/OAuth/Yahoo.php b/src/Auth/OAuth/Yahoo.php index 64c45343d7..cdf865bbec 100644 --- a/src/Auth/OAuth/Yahoo.php +++ b/src/Auth/OAuth/Yahoo.php @@ -41,6 +41,17 @@ class Yahoo extends OAuth return 'yahoo'; } + + /** + * @param $state + * + * @return json + */ + public function parseState(string $state) + { + return json_decode(html_entity_decode($state), true); + } + /** * @return string */ @@ -143,7 +154,7 @@ class Yahoo extends OAuth { if (empty($this->user)) { $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;