From af56f852e1be05a9582638e0740212355ba0c4ae Mon Sep 17 00:00:00 2001 From: "Juan M. Ley" Date: Sun, 26 Apr 2026 16:39:36 -0600 Subject: [PATCH] checking --- src/infrastructure/api/users/auth_service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/infrastructure/api/users/auth_service.py b/src/infrastructure/api/users/auth_service.py index 4feccf5..5d2cd58 100644 --- a/src/infrastructure/api/users/auth_service.py +++ b/src/infrastructure/api/users/auth_service.py @@ -26,7 +26,9 @@ class AuthService: Returns: Hash bcrypt de la contraseña """ - return pwd_context.hash(password) + # Bcrypt tiene límite de 72 bytes + password_truncated = password[:72] + return pwd_context.hash(password_truncated) def verify_password(self, plain_password: str, hashed_password: str) -> bool: """ @@ -39,7 +41,9 @@ class AuthService: Returns: True si la contraseña es correcta, False en caso contrario """ - return pwd_context.verify(plain_password, hashed_password) + # Bcrypt tiene límite de 72 bytes + plain_password_truncated = plain_password[:72] + return pwd_context.verify(plain_password_truncated, hashed_password) def create_access_token(self, user_id: int, email: str) -> str: """