1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 09:21:34 +02:00
invoiceninja/app/Libraries/OAuth/Providers/Google.php

21 lines
426 B
PHP
Raw Normal View History

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