mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
chore: apple Adapter Fixes
This commit is contained in:
parent
c63eb7fda5
commit
f7acaea6a9
1 changed files with 10 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue