IntegraChat / test_key.py
nothingworry's picture
refactor(analytics): Remove SQLite fallback, require Supabase exclusively
d74c0dc
raw
history blame
1.12 kB
import os
from dotenv import load_dotenv
load_dotenv()
key = os.getenv("SUPABASE_SERVICE_KEY")
url = os.getenv("SUPABASE_URL")
print("Checking Supabase Configuration:")
print("=" * 50)
if key:
print(f"SUPABASE_SERVICE_KEY:")
print(f" Length: {len(key)} characters")
print(f" Starts with 'eyJ': {key.startswith('eyJ')}")
print(f" First 30 chars: {key[:30]}...")
print(f" Last 30 chars: ...{key[-30:]}")
if len(key) >= 200:
print(f" [OK] Key length is correct")
else:
print(f" [WARNING] Key might be too short (expected 200+)")
if key.startswith("eyJ"):
print(f" [OK] Key format looks correct (JWT)")
else:
print(f" [WARNING] Key doesn't start with 'eyJ'")
else:
print("SUPABASE_SERVICE_KEY: NOT SET")
print()
if url:
print(f"SUPABASE_URL:")
print(f" Value: {url}")
if url.startswith("https://") and ".supabase.co" in url:
print(f" [OK] URL format looks correct")
else:
print(f" [WARNING] URL format might be incorrect")
else:
print("SUPABASE_URL: NOT SET")
print()
print("=" * 50)