public function oAuthCallback(string $driver): RedirectResponse 	{ 		$oAuthHandler = new OAuthHandler; 		$user = $oAuthHandler->getUser($driver);  		if (!$user) { 			abort(401, $oAuthHandler->getLastExceptionMessage() ?? ''); 		}  		$check = User::where(function ($query) use ($driver, $user): void { 			$query->where('email', $user->getEmail())->orWhere($driver, $user->getId()); 		}) 		->first();  		if ($check) { 			$check->update([ 				$driver => $user->getId(), 				'avatar' => $user->getAvatar(), 			]);  			if (auth()->check()) { 				auth()->logout(); 			}  			auth()->login($check);  			$check->fireLoginEvent(); 		}  		return auth()->check() 			? redirect()->intended(route('home')) 			: redirect()->route('register')->with([ 				'oauth_user' => $user, 				'oauth_driver' => $driver, 			]); 	}