1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-10-02 06:07:11 +02:00
invoiceninja/app/Libraries/OAuth/Providers/Google.php
David Bomba f712b789ca
Fixes for tests (#3184)
* 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
2019-12-31 08:59:12 +11:00

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
}
}