Merge pull request #774 from christyjacob4/0.7.x

feat: updated new Linkedin scopes
This commit is contained in:
Eldad A. Fux authored and GitHub committed 2020-12-24 16:21:53 +02:00
commit 1a11bec5f1
2 files changed
+2 -6

No files matched your search

-4
View File
@@ -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']));
@@ -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',
];