diff --git a/src/Auth/OAuth/Apple.php b/src/Auth/OAuth/Apple.php index 4f626bef9a..d0abf7be70 100644 --- a/src/Auth/OAuth/Apple.php +++ b/src/Auth/OAuth/Apple.php @@ -33,9 +33,9 @@ class Apple extends OAuth public function getLoginURL(): string { return 'https://appleid.apple.com/auth/authorize?'.http_build_query([ - 'client_id' => urlencode($this->appID), - 'redirect_uri' => urlencode($this->callback), - 'state' => urlencode(json_encode($this->state)), + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'state' => json_encode($this->state), 'response_type' => 'code', 'response_mode' => 'form_post', 'scope' => implode('+', $this->getScopes()) @@ -54,11 +54,13 @@ class Apple extends OAuth 'POST', 'https://appleid.apple.com/auth/token', $headers, - 'code='.urlencode($code). - '&client_id='.urlencode($this->appID). - '&client_secret='.urlencode($this->appSecret). - '&redirect_uri='.urlencode($this->callback). - '&grant_type=authorization_code' + http_build_query([ + 'code' => $code, + 'client_id' => $this->appID, + 'client_secret' => $this->appSecret, + 'redirect_uri' => $this->callback, + 'grant_type' => 'authorization_code' + ]) ); var_dump($accessToken);