diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index f4ccd225c8..dee63154ff 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -292,8 +292,6 @@ App::get('/v1/account/sessions/oauth2/:provider') $appId = $project->getAttribute('usersOauth2'.\ucfirst($provider).'Appid', ''); $appSecret = $project->getAttribute('usersOauth2'.\ucfirst($provider).'Secret', '{}'); - $appSecret = \json_decode($appSecret, true); - if (!empty($appSecret) && isset($appSecret['version'])) { $key = App::getEnv('_APP_OPENSSL_KEY_V'.$appSecret['version']); $appSecret = OpenSSL::decrypt($appSecret['data'], $appSecret['method'], $key, 0, \hex2bin($appSecret['iv']), \hex2bin($appSecret['tag'])); @@ -395,8 +393,6 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $appId = $project->getAttribute('usersOauth2'.\ucfirst($provider).'Appid', ''); $appSecret = $project->getAttribute('usersOauth2'.\ucfirst($provider).'Secret', '{}'); - $appSecret = \json_decode($appSecret, true); - if (!empty($appSecret) && isset($appSecret['version'])) { $key = App::getEnv('_APP_OPENSSL_KEY_V'.$appSecret['version']); $appSecret = OpenSSL::decrypt($appSecret['data'], $appSecret['method'], $key, 0, \hex2bin($appSecret['iv']), \hex2bin($appSecret['tag'])); diff --git a/src/Appwrite/Auth/OAuth2/LinkedIn.php b/src/Appwrite/Auth/OAuth2/Linkedin.php similarity index 98% rename from src/Appwrite/Auth/OAuth2/LinkedIn.php rename to src/Appwrite/Auth/OAuth2/Linkedin.php index d2315980bb..5f7a762020 100644 --- a/src/Appwrite/Auth/OAuth2/LinkedIn.php +++ b/src/Appwrite/Auth/OAuth2/Linkedin.php @@ -4,7 +4,7 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; -class LinkedIn extends OAuth2 +class Linkedin extends OAuth2 { /** * @var array @@ -15,7 +15,7 @@ class LinkedIn extends OAuth2 * @var array */ protected $scopes = [ - 'r_basicprofile', + 'r_liteprofile', 'r_emailaddress', ];