mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
updating twitch to latest api (Helix)
Summary: api doc : https://dev.twitch.tv/docs/api/reference oauth2 doc : https://dev.twitch.tv/docs/authentication Test Plan: I have successfully setup OAuth2 authentication against Twitch Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: avivey, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Tags: #auth Maniphest Tasks: T15122 Differential Revision: https://we.phorge.it/D25057
This commit is contained in:
parent
dc558b5538
commit
d5040f9a8f
1 changed files with 6 additions and 6 deletions
|
@ -14,7 +14,7 @@ final class PhutilTwitchAuthAdapter extends PhutilOAuthAuthAdapter {
|
|||
}
|
||||
|
||||
public function getAccountID() {
|
||||
return $this->getOAuthAccountData('_id');
|
||||
return $this->getOAuthAccountData('id');
|
||||
}
|
||||
|
||||
public function getAccountEmail() {
|
||||
|
@ -22,11 +22,11 @@ final class PhutilTwitchAuthAdapter extends PhutilOAuthAuthAdapter {
|
|||
}
|
||||
|
||||
public function getAccountName() {
|
||||
return $this->getOAuthAccountData('name');
|
||||
return $this->getOAuthAccountData('login');
|
||||
}
|
||||
|
||||
public function getAccountImageURI() {
|
||||
return $this->getOAuthAccountData('logo');
|
||||
return $this->getOAuthAccountData('profile_image_url');
|
||||
}
|
||||
|
||||
public function getAccountURI() {
|
||||
|
@ -42,11 +42,11 @@ final class PhutilTwitchAuthAdapter extends PhutilOAuthAuthAdapter {
|
|||
}
|
||||
|
||||
protected function getAuthenticateBaseURI() {
|
||||
return 'https://api.twitch.tv/kraken/oauth2/authorize';
|
||||
return 'https://id.twitch.tv/oauth2/authorize';
|
||||
}
|
||||
|
||||
protected function getTokenBaseURI() {
|
||||
return 'https://api.twitch.tv/kraken/oauth2/token';
|
||||
return 'https://id.twitch.tv/oauth2/token';
|
||||
}
|
||||
|
||||
public function getScope() {
|
||||
|
@ -69,7 +69,7 @@ final class PhutilTwitchAuthAdapter extends PhutilOAuthAuthAdapter {
|
|||
return id(new PhutilTwitchFuture())
|
||||
->setClientID($this->getClientID())
|
||||
->setAccessToken($this->getAccessToken())
|
||||
->setRawTwitchQuery('user')
|
||||
->setRawTwitchQuery('users')
|
||||
->resolve();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue