Karan6124 commited on
Commit
0705a4f
·
1 Parent(s): 75f0c2f

debug: add startup diagnostics for Google OAuth credentials

Browse files
Files changed (1) hide show
  1. app/main.py +19 -0
app/main.py CHANGED
@@ -16,6 +16,25 @@ from starlette.middleware.sessions import SessionMiddleware # type: ignore
16
  from app.api.routes import router as cases_router
17
  from app.api.auth import router as auth_router
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  app = FastAPI(
20
  title="Multi-Agent Investigator Engine",
21
  description="An agent orchestration runtime with shared context and verification.",
 
16
  from app.api.routes import router as cases_router
17
  from app.api.auth import router as auth_router
18
 
19
+ # Diagnostic: check environment variables on startup
20
+ google_id = os.getenv("GOOGLE_CLIENT_ID")
21
+ google_secret = os.getenv("GOOGLE_CLIENT_SECRET")
22
+
23
+ print("--- OAUTH CREDENTIAL DIAGNOSTICS ---")
24
+ if google_id:
25
+ print(f"GOOGLE_CLIENT_ID: length={len(google_id)}, starts with='{google_id[:10]}...', ends with='...{google_id[-10:]}'")
26
+ else:
27
+ print("GOOGLE_CLIENT_ID is NOT SET!")
28
+
29
+ if google_secret:
30
+ # Check for trailing newlines or spaces
31
+ has_whitespace = google_secret != google_secret.strip()
32
+ print(f"GOOGLE_CLIENT_SECRET: length={len(google_secret)}, has_whitespace={has_whitespace}, starts with='{google_secret[:5]}...', ends with='...{google_secret[-5:]}'")
33
+ else:
34
+ print("GOOGLE_CLIENT_SECRET is NOT SET!")
35
+ print("-------------------------------------")
36
+
37
+
38
  app = FastAPI(
39
  title="Multi-Agent Investigator Engine",
40
  description="An agent orchestration runtime with shared context and verification.",