1
0
Fork 0
mirror of synced 2024-06-28 11:10:46 +12:00

Merge pull request #774 from christyjacob4/0.7.x

feat: updated new Linkedin scopes
This commit is contained in:
Eldad A. Fux 2020-12-24 16:21:53 +02:00 committed by GitHub
commit 1a11bec5f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

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']));

View file

@ -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',
];