Фикс аутентификации

main
through-your-tears 9 months ago
parent 7cb59138d5
commit 95a4a27278

@ -7,10 +7,10 @@ import jwt
def generate_jwt(pk):
dt = datetime.datetime.now(tz=pytz.timezone('Europe/Moscow')) + datetime.timedelta(
seconds=settings.TOKEN_LIFETIME['seconds'],
minutes=settings.TOKEN_LIFETIME['minutes'],
hours=settings.TOKEN_LIFETIME['hours'],
days=settings.TOKEN_LIFETIME['days']
seconds=settings.ACCESS_TOKEN_LIFETIME['seconds'],
minutes=settings.ACCESS_TOKEN_LIFETIME['minutes'],
hours=settings.ACCESS_TOKEN_LIFETIME['hours'],
days=settings.ACCESS_TOKEN_LIFETIME['days']
)
token = jwt.api_jwt.encode({
'id': pk,

Loading…
Cancel
Save