1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00

Connected Gmail Account

This commit is contained in:
David Bomba 2021-03-22 10:48:00 +11:00
parent cfef367952
commit 0c5b551ce1

View File

@ -97,21 +97,12 @@ class ConnectedAccountController extends BaseController
$client->setClientId(config('ninja.auth.google.client_id'));
$client->setClientSecret(config('ninja.auth.google.client_secret'));
$client->setRedirectUri(config('ninja.app_url'));
// $token = $client->authenticate(request()->input('server_auth_code'));
$refresh_token = '';
// if (array_key_exists('refresh_token', $token)) {
// $refresh_token = $token['refresh_token'];
// }
$token = '';
$connected_account = [
'email' => $google->harvestEmail($user),
'oauth_user_id' => $google->harvestSubField($user),
// 'oauth_user_token' => $token,
// 'oauth_user_refresh_token' => $refresh_token,
'oauth_provider_id' => 'google',
'email_verified_at' =>now()
];
@ -153,8 +144,6 @@ class ConnectedAccountController extends BaseController
$refresh_token = $token['refresh_token'];
}
$token = '';
$connected_account = [
'email' => $google->harvestEmail($user),
'oauth_user_id' => $google->harvestSubField($user),