From d8a0e9bd14f389ddc644ec33174044ec6808dd06 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 24 Dec 2020 18:04:55 +0530 Subject: [PATCH] feat: updated new Linkedin scopes --- app/controllers/api/account.php | 4 ---- src/Appwrite/Auth/OAuth2/LinkedIn.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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 index d2315980bb..87d4783ef1 100644 --- a/src/Appwrite/Auth/OAuth2/LinkedIn.php +++ b/src/Appwrite/Auth/OAuth2/LinkedIn.php @@ -15,7 +15,7 @@ class LinkedIn extends OAuth2 * @var array */ protected $scopes = [ - 'r_basicprofile', + 'r_liteprofile', 'r_emailaddress', ];