Small improvements and fixes

This commit is contained in:
ITQ
2024-03-16 13:15:45 +03:00
parent 65885b3a84
commit 3d7e4aa8bd
4 changed files with 14 additions and 8 deletions
+2 -3
View File
@@ -32,9 +32,8 @@ class JWTAuthentication(BaseAuthentication):
user = Profile.objects.get(id=payload["id"])
if not bcrypt.checkpw(
payload["password"].encode("utf-8"),
user.password.encode("utf-8"),
if payload["password"].encode("utf-8") != user.password.encode(
"utf-8"
):
error = "Token has expired"
raise AuthenticationFailed(error)