fix login api

This commit is contained in:
behruz-dev
2025-07-29 13:20:31 +05:00
parent a855846a55
commit a697c6a6a3
4 changed files with 8 additions and 6 deletions

View File

@@ -8,12 +8,11 @@ r = redis.StrictRedis.from_url(env.str('REDIS_URL'))
def cache_user_credentials(phone_number, password, time):
hashed_password = make_password(password)
key = f"user_credentials:{phone_number}"
r.hmset(key, {
"phone": phone_number,
"password": hashed_password
"password": password
})
r.expire(key, time)