diff --git a/Provider.php b/Provider.php index 9be52d3..ccb01f9 100644 --- a/Provider.php +++ b/Provider.php @@ -105,17 +105,17 @@ protected function parseAccessToken($body) */ protected function getUserByToken($token) { - if (is_null($this->steamId)) { + if (is_null($token)) { return null; } - if (empty($this->getConfig('api_key'))) { + if (empty($this->getConfig('client_secret'))) { throw new RuntimeException('The Steam API key has not been specified.'); } $response = $this->getHttpClient()->request( 'GET', - sprintf(self::STEAM_INFO_URL, $this->getConfig('api_key'), $this->steamId) + sprintf(self::STEAM_INFO_URL, $this->getConfig('client_secret'), $token) ); $contents = json_decode($response->getBody()->getContents(), true); @@ -298,6 +298,6 @@ protected function getTokenUrl() public static function additionalConfigKeys() { - return ['api_key', 'realm', 'https', 'proxy']; + return ['client_secret', 'realm', 'https', 'proxy']; } } diff --git a/README.md b/README.md index d6df9a3..a790d4b 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), ### Add configuration to `config/services.php` ```php -'steam' => [ - 'client_id' => env('STEAM_CLIENT_ID'), - 'client_secret' => env('STEAM_CLIENT_SECRET'), - 'redirect' => env('STEAM_REDIRECT_URI') +'steam' => [ + 'client_id' => null, + 'client_secret' => env('STEAM_CLIENT_SECRET'), + 'redirect' => env('STEAM_REDIRECT_URI') ], ```