Nuevo Commit

This commit is contained in:
2025-11-18 16:46:20 -03:00
parent be30b3ca18
commit 443de4ec0e
12 changed files with 1969 additions and 206 deletions

View File

@@ -24,7 +24,12 @@ def create_access_token(data: dict, expires_delta: Optional[timedelta] = None):
def decode_access_token(token: str):
try:
print(f"Attempting to decode token: {token[:50]}...") # Debug
print(f"Using SECRET_KEY: {settings.SECRET_KEY[:20]}...") # Debug
print(f"Using ALGORITHM: {settings.ALGORITHM}") # Debug
payload = jwt.decode(token, settings.SECRET_KEY, algorithms=[settings.ALGORITHM])
print(f"Successfully decoded payload: {payload}") # Debug
return payload
except JWTError:
except JWTError as e:
print(f"JWT decode error: {e}") # Debug
return None