mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-26 09:43:19 -05:00
feat: Remove backend cookie and use frontend for auth (#6601)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user