register user, sign in and sign out working

This commit is contained in:
knst-kotov
2021-06-29 13:26:46 +03:00
parent 2dac73b412
commit c9b3d3a833
14 changed files with 81 additions and 30 deletions

View File

@@ -3,7 +3,7 @@ from datetime import datetime, timedelta
from auth.token import Token
from redis import redis
from settings import JWT_LIFE_SPAN
from validations import User
from auth.validations import User
class Authorize:
@@ -30,7 +30,7 @@ class Authorize:
except: # noqa
pass
else:
await redis.execute("DEL", f"{payload.id}-{token}")
await redis.execute("DEL", f"{payload.user_id}-{token}")
return True
@staticmethod