Skip to content

Commit

Permalink
Save session cookies for 3 months instead of during session
Browse files Browse the repository at this point in the history
  • Loading branch information
redfast00 committed Nov 26, 2024
1 parent 2daf3f4 commit fe8d4a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def register_plugins(app: Flask) -> Flask:
app.config.update(
SESSION_COOKIE_HTTPONLY=True,
SESSION_COOKIE_SAMESITE="Lax",
PERMANENT_SESSION_LIFETIME=3*31*24*60*60,
)

if not app.debug:
Expand Down
1 change: 1 addition & 0 deletions app/auth/zeus.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def init_oauth(app):
def login_and_redirect_user(user) -> Response:
"""Log in the user and then redirect them"""
login_user(user)
session.permanent = True
return redirect(url_for("general_bp.home"))


Expand Down

0 comments on commit fe8d4a7

Please sign in to comment.