-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Sessions: do not save on each request #9402
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable. 15 days is pretty short, and might be annoying in some ways. I think it would be good if we could get to 30 days in the future, and perhaps just trigger a task automatically for users that have logged in login_days_ago % 7 = 0
or something?
OK, I will put this back as it was: 30 days. I will create a task to do the resync as I wanted, as well. |
Currently, we have a 30 days expiry time for cookies with "save on every request" enabled. That means users won't need to re-login if they hit at least one Read the Docs page every 30 days. In an attempt to reduce this "infinit session time", I'm disabling the "save on every request". This way we are forcing the users to re-login every 30 days --no matter if they hit a Read the Docs page during that time or not. This will help us to know what are the active users because we will be able to check `User.last_login` and get reasonable numbers. With the current configuration, a user that used the platform _today_ could have a pretty old `last_login` since we are not forcing re-login at all.
a0820b5
to
f193886
Compare
I updated the commit message and the description as well |
Copy the logic from `readthedocs-corporate` to resync `RemoteRepository` each time the user logs in. We are forcing users to re-login every 30 days minimum. Related: #9402
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good 👍
Copy the logic from `readthedocs-corporate` to resync `RemoteRepository` each time the user logs in. We are forcing users to re-login every 30 days minimum. Related: #9402
Currently, we have a 30 days expiry time for cookies with "save on every request"
enabled. That means users won't need to re-login if they hit at least one Read
the Docs page every 30 days.
In an attempt to reduce this "infinit session time", I'm disabling the "save on
every request". This way we are forcing the users to re-login every 30 days --no
matter if they hit a Read the Docs page during that time or not.
This will help us to know what are the active users because we will be able to
check
User.last_login
and get reasonable numbers. With the currentconfiguration, a user that used the platform today could have a pretty old
last_login
since we are not forcing re-login at all.Discussion: https://github.com/readthedocs/meta/discussions/31