mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Switch to using username as match for google login
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
567a800c51
commit
e950cf4279
|
@ -33,9 +33,9 @@ class GoogleAuthController extends Controller
|
|||
{
|
||||
try {
|
||||
$socialUser = Socialite::driver('google')->user();
|
||||
\Log::debug('Social user found');
|
||||
\Log::debug('Google user found');
|
||||
} catch (InvalidStateException $exception) {
|
||||
\Log::debug('Social user found');
|
||||
\Log::debug('Google user NOT found');
|
||||
return redirect()->route('login')
|
||||
->withErrors(
|
||||
[
|
||||
|
@ -47,7 +47,7 @@ class GoogleAuthController extends Controller
|
|||
}
|
||||
|
||||
|
||||
$user = User::where('email', $socialUser->getEmail())->first();
|
||||
$user = User::where('username', $socialUser->getEmail())->first();
|
||||
|
||||
|
||||
if ($user) {
|
||||
|
|
Loading…
Reference in a new issue