1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Connected Gmail Account

This commit is contained in:
David Bomba 2021-03-22 09:52:39 +11:00
parent b284259ad5
commit c97dea08d2
2 changed files with 6 additions and 6 deletions

View File

@ -330,7 +330,7 @@ class LoginController extends BaseController
// $client->setClientSecret(config('ninja.auth.google.client_secret'));
// $client->setRedirectUri(config('ninja.app_url'));
$token = false;
// $token = false;
// try{
// $token = $client->authenticate(request()->input('server_auth_code'));
@ -350,7 +350,7 @@ class LoginController extends BaseController
// $refresh_token = $token['refresh_token'];
// }
$refresh_token = '';
// $refresh_token = '';
$name = OAuth::splitName($google->harvestName($user));
@ -360,8 +360,8 @@ class LoginController extends BaseController
'password' => '',
'email' => $google->harvestEmail($user),
'oauth_user_id' => $google->harvestSubField($user),
'oauth_user_token' => $token,
'oauth_user_refresh_token' => $refresh_token,
// 'oauth_user_token' => $token,
// 'oauth_user_refresh_token' => $refresh_token,
'oauth_provider_id' => 'google',
];

View File

@ -110,8 +110,8 @@ class ConnectedAccountController extends BaseController
$connected_account = [
'email' => $google->harvestEmail($user),
'oauth_user_id' => $google->harvestSubField($user),
'oauth_user_token' => $token,
'oauth_user_refresh_token' => $refresh_token,
// 'oauth_user_token' => $token,
// 'oauth_user_refresh_token' => $refresh_token,
'oauth_provider_id' => 'google',
'email_verified_at' =>now()
];