@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

k__nard and committed by
Matthew Bowker
d5040f9a dc558b55

+6 -6
+6 -6
src/applications/auth/adapter/PhutilTwitchAuthAdapter.php
··· 14 14 } 15 15 16 16 public function getAccountID() { 17 - return $this->getOAuthAccountData('_id'); 17 + return $this->getOAuthAccountData('id'); 18 18 } 19 19 20 20 public function getAccountEmail() { ··· 22 22 } 23 23 24 24 public function getAccountName() { 25 - return $this->getOAuthAccountData('name'); 25 + return $this->getOAuthAccountData('login'); 26 26 } 27 27 28 28 public function getAccountImageURI() { 29 - return $this->getOAuthAccountData('logo'); 29 + return $this->getOAuthAccountData('profile_image_url'); 30 30 } 31 31 32 32 public function getAccountURI() { ··· 42 42 } 43 43 44 44 protected function getAuthenticateBaseURI() { 45 - return 'https://api.twitch.tv/kraken/oauth2/authorize'; 45 + return 'https://id.twitch.tv/oauth2/authorize'; 46 46 } 47 47 48 48 protected function getTokenBaseURI() { 49 - return 'https://api.twitch.tv/kraken/oauth2/token'; 49 + return 'https://id.twitch.tv/oauth2/token'; 50 50 } 51 51 52 52 public function getScope() { ··· 69 69 return id(new PhutilTwitchFuture()) 70 70 ->setClientID($this->getClientID()) 71 71 ->setAccessToken($this->getAccessToken()) 72 - ->setRawTwitchQuery('user') 72 + ->setRawTwitchQuery('users') 73 73 ->resolve(); 74 74 } 75 75