chore: Adapter fixes
This commit is contained in:
parent
1678021ce3
commit
c63eb7fda5
2 changed files with 14 additions and 8 deletions
|
@ -14,6 +14,11 @@ class Apple extends OAuth
|
|||
*/
|
||||
protected $user = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $scopes = ["name", "email"];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -27,13 +32,14 @@ class Apple extends OAuth
|
|||
*/
|
||||
public function getLoginURL(): string
|
||||
{
|
||||
return 'https://appleid.apple.com/auth/authorize?'.
|
||||
'client_id='.urlencode($this->appID).
|
||||
'&redirect_uri='.urlencode($this->callback).
|
||||
'&state='.urlencode(json_encode($this->state)).
|
||||
'&response_type=code'.
|
||||
'&response_mode=form_post'.
|
||||
'&scope=name+email';
|
||||
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)),
|
||||
'response_type' => 'code',
|
||||
'response_mode' => 'form_post',
|
||||
'scope' => implode('+', $this->getScopes())
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,7 @@ class LinkedIn extends OAuth
|
|||
'response_type' => 'code',
|
||||
'client_id' => $this->appID,
|
||||
'redirect_uri' => $this->callback,
|
||||
'scope' => implode(' ', $this->scope),
|
||||
'scope' => implode(' ', $this->getScopes()),
|
||||
'state' => json_encode($this->state),
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue