mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 23:22:52 +01:00
23 lines
428 B
PHP
23 lines
428 B
PHP
<?php namespace App\Ninja\OAuth\Providers;
|
|
|
|
class Google implements ProviderInterface
|
|
{
|
|
|
|
public function getTokenResponse($token)
|
|
{
|
|
|
|
$client = new \Google_Client();
|
|
return $client->verifyIdToken($token);
|
|
}
|
|
|
|
public function harvestEmail($payload)
|
|
{
|
|
return $payload['email'];
|
|
}
|
|
|
|
public function harvestSubField($payload)
|
|
{
|
|
return $payload['sub']; // user ID
|
|
}
|
|
}
|