From 2563d55b955aabb8a9cd17c82a293a0f39923b3c Mon Sep 17 00:00:00 2001 From: "beetles-ai[bot]" <221859081+beetles-ai[bot]@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:29:16 +0000 Subject: [PATCH] Patch for controllers/auth.py --- controllers/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/auth.py b/controllers/auth.py index 080fdc1..b5b9ff1 100644 --- a/controllers/auth.py +++ b/controllers/auth.py @@ -30,7 +30,9 @@ class TokenResponse(BaseModel): auth_router = APIRouter() DEFAULT_STATUSES = ["BOOKMARKED", "APPLIED", "ACCEPTED", "REJECTED"] -JWT_SECRET = os.getenv('JWT_SECRET', 'your-secret-key') +JWT_SECRET = os.getenv('JWT_SECRET') +if not JWT_SECRET: +raise ValueError("JWT_SECRET environment variable must be set") # Helper function to set JWT token async def create_token(user):