mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
f712b789ca
* fix typo * php-cs traits * CS fixer pass * Password protect User routes * Implement checks to prevent editing a deleted record * Clean up payment flows * Fixes for tests
21 lines
426 B
PHP
21 lines
426 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
|
|
}
|
|
}
|