feat: Remove backend cookie and use frontend for auth (#6601)

This commit is contained in:
Michael Genson
2025-11-28 19:29:16 -06:00
committed by GitHub
parent 8f1ce1a1c3
commit 07ecd88685
20 changed files with 72 additions and 172 deletions

View File

@@ -128,11 +128,8 @@ class AppSettings(AppLoggingSettings):
def validate_token_time(cls, v: int) -> int:
if v < 1:
raise ValueError("TOKEN_TIME must be at least 1 hour")
# If TOKEN_TIME is unreasonably high (e.g. hundreds of years), JWT encoding
# can overflow, so we set the max to 10 years (87600 hours).
if v > 87600:
raise ValueError("TOKEN_TIME is too high; maximum is 87600 hours (10 years)")
return v
# Certain browsers (webkit) have issues with very long-lived cookies, so we limit to 400 days
return min(v, 400 * 24)
SECRET: str
SESSION_SECRET: str