cache->pull($request->input('confirmation_token'), []); $user = $this->repository->find(array_get($cache, 'user_id', 0)); } catch (RecordNotFoundException $exception) { return $this->sendFailedLoginResponse($request); } if (array_get($cache, 'request_ip') !== $request->ip()) { return $this->sendFailedLoginResponse($request, $user); } if (! $this->google2FA->verifyKey( $this->encrypter->decrypt($user->totp_secret), $request->input('authentication_code'), config('pterodactyl.auth.2fa.window') )) { return $this->sendFailedLoginResponse($request, $user); } return $this->sendLoginResponse($user, $request); } }