Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-5171 Make session last 2 weeks #3059

Merged
merged 8 commits into from
Sep 17, 2017
Merged

AO3-5171 Make session last 2 weeks #3059

merged 8 commits into from
Sep 17, 2017

Conversation

sarken
Copy link
Member

@sarken sarken commented Sep 13, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5171

Purpose

Extends the lifespan of our session cookies to two weeks to mitigate the whole "trying to submit a form, getting logged out" issue

Testing

Will be added to JIRA

@sarken sarken changed the title AO3-5171 Make session cookie last 2 weeks AO3-5171 Make session last 2 weeks Sep 16, 2017
@zz9pzza
Copy link
Contributor

zz9pzza commented Sep 16, 2017

Looks reasonable, in a perfect world the 2 weeks and 3 months would be configurables.

…ng users to log out if they are using a public or shared computer
@@ -11,6 +11,11 @@
SESSION_KEY: '_otwarchive_session'
SESSION_SECRET: '898f6d0363863ec79d782238cd1c5767636d712cc0d138238bcd5bfc9d2672fb852380050e52c03a0401175d909c09dba48512a119d46b126a84c2dd05716eb5'

# In weeks
DEFAULT_SESSION_LENGTH: 2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing 2.weeks and 3.months here makes things explode because they're treated as a string.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it is right to have the numbers in different units, we could use 13 weeks ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought about that, but I figured as long as the config file was clear about the units, it would be less error-prone than needing to do the math on how many weeks are in a month. (Three months would be 12 weeks, wouldn't it?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My other thought was we could include the unit in the name, but that makes it somewhat unwieldy (e.g. DEFAULT_SESSION_LENGTH_IN_WEEKS)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with unwieldy names that reduce confusion.

@zz9pzza zz9pzza merged commit 5887b61 into otwcode:master Sep 17, 2017
@sarken sarken deleted the AO3-5171 branch February 18, 2018 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants