From fc6092d2820a2df2db4dab70647611f910efb5b2 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Thu, 7 Nov 2024 15:47:09 -0800 Subject: [PATCH] Make auth cookie persist for 30 days --- backend-flask/login.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend-flask/login.py b/backend-flask/login.py index d5cb307..4161072 100644 --- a/backend-flask/login.py +++ b/backend-flask/login.py @@ -1,3 +1,4 @@ +from datetime import timedelta import random import string import urllib.parse @@ -56,7 +57,12 @@ def steam_authenticate(): }) # TODO: secure=True in production - resp.set_cookie("auth", auth_session.key, httponly=True) + resp.set_cookie( + "auth", + auth_session.key, + httponly=True, + max_age=timedelta(days=30), + ) return resp return abort(401)