protected function authenticated(Request $request, Authenticatable $user)
{
// Explicitly log them out for now if they do no exist.
- if (!$user->exists) auth()->logout($user);
+ if (!$user->exists) {
+ auth()->logout($user);
+ }
if (!$user->exists && $user->email === null && !$request->filled('email')) {
$request->flash();
}
if (!$user->exists) {
-
// Check for users with same email already
$alreadyUser = $user->newQuery()->where('email', '=', $user->email)->count() > 0;
if ($alreadyUser) {
session()->put('social-callback', 'login');
return $this->socialAuthService->startLogIn($socialDriver);
}
-}
\ No newline at end of file
+}