Skip to content

Sets login sessions to permanent for longer login sessions#73

Merged
mgerni merged 1 commit into
OSRS-Taskman:masterfrom
lesteenman:permanent-login-sessions
Dec 31, 2025
Merged

Sets login sessions to permanent for longer login sessions#73
mgerni merged 1 commit into
OSRS-Taskman:masterfrom
lesteenman:permanent-login-sessions

Conversation

@lesteenman
Copy link
Copy Markdown
Contributor

This change makes it so Flask's session cookie is stored with an explicit expiration date. This means that, rather than the login expiring after the browser closes (expiration = 'Session'), it expires on an explicit date. By default, 31 days.

The duration could be modified, e.g. with the following line in taskapp.py:

app.permanent_session_lifetime = timedelta(days=7)

However, given the insensitive nature of the data in this application, I would not bother.

This change makes it so Flask's session cookie is stored with an explicit expiration date. This means that, rather than the login expiring after the browser closes (expiration = 'Session'), it expires on an explicit date. By default, 31 days.
@lesteenman
Copy link
Copy Markdown
Contributor Author

Also, sorry about the whitespace changes - I didn't notice my IDE had done so until after I created the PR.

@mgerni mgerni merged commit bb5bbe3 into OSRS-Taskman:master Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants