diff --git a/composer.json b/composer.json index a5a0027..225fb87 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }], "require": { "php": "^5.6 || ^7.0", - "socialiteproviders/manager": "~2.0" + "socialiteproviders/manager": "~3.0" }, "autoload": { "psr-4": { diff --git a/src/Provider.php b/src/Provider.php index 193cb81..7ad9b2f 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -48,13 +48,13 @@ protected function getUserByToken($token) 'fields' => 'uid,name,first_name,last_name,birthday,pic190x190,has_email,email' ]; - ksort($params); + ksort($params, SORT_STRING); $_params = array_map(function($key, $value) { return $key . '=' . $value; }, array_keys($params), array_values($params)); - $params['sig'] = md5(join('', $_params) . md5($token . $this->clientSecret)); + $params['sig'] = md5(implode('', $_params) . md5($token . $this->clientSecret)); $params['access_token'] = $token; $response = $this->getHttpClient()->get(