1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Merge pull request #5207 from turbo124/v5-develop

Connected Gmail Account
This commit is contained in:
David Bomba 2021-03-22 10:48:16 +11:00 committed by GitHub
commit 5ab01adaf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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),