From 6332615d06467e3b94323d5e95d912183b2bc899 Mon Sep 17 00:00:00 2001 From: Mabe Date: Sun, 21 Jun 2026 17:34:29 +0200 Subject: [PATCH] fix: enhance token validation logging for better error tracking and debugging --- backend/app/auth.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/auth.py b/backend/app/auth.py index 272009e..685a4e2 100644 --- a/backend/app/auth.py +++ b/backend/app/auth.py @@ -149,6 +149,9 @@ async def validate_token(credentials: HTTPAuthorizationCredentials = Security(se logger.debug("Introspection succeeded; claims=%s", verified) try: - return TokenClaims(**verified) + token_claims = TokenClaims(**verified) + logger.debug("Token claims parsed successfully: %s", token_claims.model_dump()) + return token_claims except Exception as exc: + logger.error("Unable to parse token claims: %s; verified=%s", exc, verified) raise HTTPException(status_code=401, detail="Unable to parse token claims") from exc