mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Re-use login string
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
114769c2d9
commit
e11a42cf68
|
@ -428,7 +428,7 @@ class LoginController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $request->has('two_factor_secret')) { // TODO this seems almost the same as above?
|
if (! $request->has('two_factor_secret')) { // TODO this seems almost the same as above?
|
||||||
return redirect()->route('two-factor')->with('error', 'Two-factor code is required.');
|
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.code_required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
@ -439,7 +439,7 @@ class LoginController extends Controller
|
||||||
$user->saveQuietly();
|
$user->saveQuietly();
|
||||||
$request->session()->put('2fa_authed', $user->id);
|
$request->session()->put('2fa_authed', $user->id);
|
||||||
|
|
||||||
return redirect()->route('home')->with('success', trans('auth/general.login_success'));
|
return redirect()->route('home')->with('success', trans('auth/message.signin.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.invalid_code'));
|
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.invalid_code'));
|
||||||
|
|
|
@ -15,6 +15,5 @@ return [
|
||||||
'google_login' => 'Login with Google Workspace',
|
'google_login' => 'Login with Google Workspace',
|
||||||
'google_login_failed' => 'Google Login failed, please try again.',
|
'google_login_failed' => 'Google Login failed, please try again.',
|
||||||
'two_factor_code' => 'Please enter your two-factor authentication code.',
|
'two_factor_code' => 'Please enter your two-factor authentication code.',
|
||||||
'login_success' => 'You are logged in!.',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue