1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00
invoiceninja/app/Libraries/OAuth/Providers/Google.php
David Bomba 74a6c4f2ee
Reminders (#3630)
* Performance improvements moving from str_replace to strtr

* Remove legacy docs

* Clean up credit transformer

* Working on invoice emails

* Clean up for invoice designs

* Tests for light and dark theme emails

* Working on reminder scheduling

* Reminder Job Class

* Fixes for github actions

* PHP CS

* Test for reminders

* Test for reminders
2020-04-15 10:30:52 +10:00

23 lines
431 B
PHP

<?php
namespace App\Libraries\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
}
}