diff --git a/src/Appwrite/Auth/OAuth2/Line.php b/src/Appwrite/Auth/OAuth2/Line.php index 751af897a0..0c319991f1 100644 --- a/src/Appwrite/Auth/OAuth2/Line.php +++ b/src/Appwrite/Auth/OAuth2/Line.php @@ -153,7 +153,12 @@ class Line extends OAuth2 */ protected function getUser(string $accessToken): array { + if (empty($this->user)) { + $headers = ['Authorization: Bearer ' . \urlencode($accessToken)]; + $user = $this->request('GET', 'https://api.line.me/v2/profile', $headers); + $this->user = \json_decode($user, true); + } - return []; + return $this->user; } }