Make auth cookie persist for 30 days

master
John Montagu, the 4th Earl of Sandvich 2024-11-07 15:47:09 -08:00
parent 3a10668f40
commit fc6092d282
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 7 additions and 1 deletions

View File

@ -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)