mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #5222 from turbo124/v5-develop
Fixes for default timeouts
This commit is contained in:
commit
a74e38902b
@ -193,9 +193,8 @@ class LoginController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$user->setCompany($user->account->default_company);
|
$user->setCompany($user->account->default_company);
|
||||||
// $timeout = auth()->user()->company()->default_password_timeout;
|
$timeout = auth()->user()->company()->default_password_timeout / 60000;
|
||||||
|
Cache::put(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||||
// Cache::put(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
|
||||||
|
|
||||||
$cu = CompanyUser::query()
|
$cu = CompanyUser::query()
|
||||||
->where('user_id', auth()->user()->id);
|
->where('user_id', auth()->user()->id);
|
||||||
@ -323,35 +322,6 @@ class LoginController extends BaseController
|
|||||||
|
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
|
||||||
// we are no longer accessing the permissions for gmail - email permissions here
|
|
||||||
|
|
||||||
// $client = new Google_Client();
|
|
||||||
// $client->setClientId(config('ninja.auth.google.client_id'));
|
|
||||||
// $client->setClientSecret(config('ninja.auth.google.client_secret'));
|
|
||||||
// $client->setRedirectUri(config('ninja.app_url'));
|
|
||||||
|
|
||||||
// $token = false;
|
|
||||||
|
|
||||||
// try{
|
|
||||||
// $token = $client->authenticate(request()->input('server_auth_code'));
|
|
||||||
// }
|
|
||||||
// catch(\Exception $e) {
|
|
||||||
|
|
||||||
// return response()
|
|
||||||
// ->json(['message' => ctrans('texts.invalid_credentials')], 401)
|
|
||||||
// ->header('X-App-Version', config('ninja.app_version'))
|
|
||||||
// ->header('X-Api-Version', config('ninja.minimum_client_version'));
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $refresh_token = '';
|
|
||||||
|
|
||||||
// if (array_key_exists('refresh_token', $token)) {
|
|
||||||
// $refresh_token = $token['refresh_token'];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $refresh_token = '';
|
|
||||||
|
|
||||||
$name = OAuth::splitName($google->harvestName($user));
|
$name = OAuth::splitName($google->harvestName($user));
|
||||||
|
|
||||||
$new_account = [
|
$new_account = [
|
||||||
@ -373,6 +343,8 @@ class LoginController extends BaseController
|
|||||||
|
|
||||||
auth()->user()->email_verified_at = now();
|
auth()->user()->email_verified_at = now();
|
||||||
auth()->user()->save();
|
auth()->user()->save();
|
||||||
|
$timeout = auth()->user()->company()->default_password_timeout / 60000;
|
||||||
|
Cache::put(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||||
|
|
||||||
$ct = CompanyUser::whereUserId(auth()->user()->id);
|
$ct = CompanyUser::whereUserId(auth()->user()->id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user