pulkitjalan / google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support
MIT License
249 stars 75 forks source link

Method authenticate is deprecated. #34

Closed artogrig closed 6 years ago

artogrig commented 6 years ago

What I should use instead of authenticate method ?? This is my code:

$client = new \PulkitJalan\Google\Client(['client_id' => 'YOUR_CLIENT_ID', 'client_secret' => 'YOUR_SECRET', 'redirect_uri' => 'YOUR_REDIRECT_URI', 'developer_key' => 'YOUR_KEY']); $google = $client->getClient(); $google->authenticate($token); $access_token = $client->getAccessToken()["access_token"];

//and now here you go $user = Socialite::driver('google')->userFromToken($access_token);