1
0
Fork 0
mirror of synced 2024-06-24 17:20:36 +12:00

chore: disabled twitter

This commit is contained in:
Christy Jacob 2019-10-08 01:09:01 +05:30
parent 8829dd0f85
commit 061f4d4836
3 changed files with 4 additions and 7 deletions

View file

@ -74,6 +74,6 @@ return [
'twitter' => [
'developers' => 'https://developer.twitter.com/',
'icon' => 'icon-twitter',
'enabled' => true,
'enabled' => false,
],
];

View file

@ -730,9 +730,6 @@ $utopia->get('/v1/auth/oauth/:provider/redirect')
$defaultState = ['success' => $project->getAttribute('url', ''), 'failure' => ''];
$validateURL = new URL();
// Uncomment this while testing amazon oAuth
// $state = html_entity_decode($state);
$appId = $project->getAttribute('usersOauth'.ucfirst($provider).'Appid', '');
$appSecret = $project->getAttribute('usersOauth'.ucfirst($provider).'Secret', '{}');

View file

@ -78,16 +78,16 @@ abstract class OAuth
*/
abstract public function getUserName(string $accessToken):string;
// The parseState function was designed specifically for Amazon OAuth Adapter to override.
// The response from Amazon is html encoded and hence it needs to be html_decoded before
// json_decoding
/**
* @param $state
*
* @return json
* @return string
*/
public function parseState(string $state)
public function parseState(string $state): string
{
return json_decode($state, true);
}