Skip to content

Commit

Permalink
Correct issue with GoogleProvider getUserByToken() method (#700)
Browse files Browse the repository at this point in the history
* fix google provider

* fix google provider
  • Loading branch information
ChengKaiChiang committed Apr 24, 2024
1 parent d67562e commit feed1c1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Two/GoogleProvider.php
Expand Up @@ -2,7 +2,6 @@

namespace Laravel\Socialite\Two;

use GuzzleHttp\Psr7\Stream;
use GuzzleHttp\RequestOptions;
use Illuminate\Support\Arr;

Expand Down Expand Up @@ -57,11 +56,7 @@ protected function getUserByToken($token)
],
]);

if ($response->getBody() instanceof Stream) {
return json_decode($response->getBody()->getContents(), true);
}

return json_decode($response->getBody(), true);
return json_decode((string) $response->getBody(), true);
}

/**
Expand Down

0 comments on commit feed1c1

Please sign in to comment.