Skip to content

Commit 76af000

Browse files
authored
Merge pull request #285 from DevanshuNEU/hotfix/api-key-auth-fallback
HOTFIX: API key auth was broken -- AuthenticationError blocked fallback path
2 parents 865c1fc + 2a072c5 commit 76af000

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backend/middleware/auth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def _validate_jwt(token: str) -> Optional[AuthContext]:
8888
except InvalidTokenError:
8989
# Could be a non-JWT token (API key) -- allow fallback
9090
return None
91-
except AuthenticationError as e:
92-
raise HTTPException(status_code=401, detail=str(e))
91+
except AuthenticationError:
92+
# Could be a non-JWT token (API key) -- allow fallback
93+
return None
9394
except Exception:
9495
return None
9596

0 commit comments

Comments
 (0)