diff --git a/pyproject.toml b/pyproject.toml index 084bc65e..a012f158 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,7 @@ dependencies = [ "anthropic == 0.49.0", "docx2txt == 0.8", "google-genai == 1.5.0", + "google-auth ~= 2.23.3", "pyjson5 == 1.6.7", "resend == 1.0.1", "email-validator == 2.2.0", @@ -107,7 +108,6 @@ khoj = "khoj.main:run" [project.optional-dependencies] prod = [ "gunicorn == 22.0.0", - "google-auth == 2.23.3", "stripe == 7.3.0", "twilio == 8.11", "boto3 >= 1.34.57", diff --git a/src/khoj/routers/auth.py b/src/khoj/routers/auth.py index 00088d00..838cfa48 100644 --- a/src/khoj/routers/auth.py +++ b/src/khoj/routers/auth.py @@ -43,12 +43,9 @@ class MagicLinkForm(BaseModel): if not state.anonymous_mode: missing_requirements = [] from authlib.integrations.starlette_client import OAuth, OAuthError + from google.auth.transport import requests as google_requests + from google.oauth2 import id_token - try: - from google.auth.transport import requests as google_requests - from google.oauth2 import id_token - except ImportError: - missing_requirements += ["Install the Khoj production package with `pip install khoj[prod]`"] if not os.environ.get("RESEND_API_KEY") and ( not os.environ.get("GOOGLE_CLIENT_ID") or not os.environ.get("GOOGLE_CLIENT_SECRET") ):