Extra debugging

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-05-10 09:10:53 -07:00
parent 27e0484072
commit 7c77f4a697
2 changed files with 6 additions and 5 deletions

View file

@ -34,9 +34,9 @@ class GoogleAuthController extends Controller
{
try {
$socialUser = Socialite::driver('google')->user();
\Log::debug('Google user found');
\Log::debug('Google user found in Google Workspace');
} catch (InvalidStateException $exception) {
\Log::debug('Google user NOT found');
\Log::debug('Google user NOT found in Google Workspace');
return redirect()->route('login')
->withErrors(
[
@ -52,7 +52,7 @@ class GoogleAuthController extends Controller
if ($user) {
\Log::debug('Google user '.$socialUser->getEmail().' found in Snipe-IT');
$user->update([
'avatar' => $socialUser->avatar,
]);
@ -61,11 +61,12 @@ class GoogleAuthController extends Controller
return redirect()->route('home');
}
\Log::debug('Google user '.$socialUser->getEmail().' NOT found in Snipe-IT');
return redirect()->route('login')
->withErrors(
[
'username' => [
trans('admin/users/message.user_not_found'),
trans('auth/general.google_login_failed'),
],
]
);

View file

@ -6,7 +6,7 @@ return array(
'declined' => 'You have successfully declined this asset.',
'bulk_manager_warn' => 'Your users have been successfully updated, however your manager entry was not saved because the manager you selected was also in the user list to be edited, and users may not be their own manager. Please select your users again, excluding the manager.',
'user_exists' => 'User already exists!',
'user_not_found' => 'User [:id] does not exist.',
'user_not_found' => 'User does not exist.',
'user_login_required' => 'The login field is required',
'user_password_required' => 'The password is required.',
'insufficient_permissions' => 'Insufficient Permissions.',