-
Notifications
You must be signed in to change notification settings - Fork 432
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
h logs users out too frequently #8949
Comments
Possible solution:
This is slightly complicated to implement. You have to track whether the user is active so you have to do something each time a user makes a request such as refreshing a cookie or ticket. (The current implementation does this by refreshing tickets). Simpler version:
This is simpler because we don't need to keep track of whether a user is active or not, so there's no need to refresh any cookie or tickets. Cookies and tickets don't even have expiry times. A problem with this is that we have no way to purge no-longer-needed auth tickets from our DB. If auth tickets never expire then we can never purge any of them. Currently, h regularly purges auth tickets that've passed their expiry time. There may be other things we can do to prevent the Both solutions still need to deal with #8948 (the problem of the user getting logged out while they have a tab still open). In the first solution if a user leaves a tab open for a year (!) and is not active in any other tabs and then tries to return to the old tab, they'll see errors. In both solutions if the user has multiple tabs open and logs out in one tab and then tries to return to another open tab they'll run into errors. |
I think we probably do want some eventual expiry time for logins, but it can be longer than it is today. For inactive users, we probably want it to be at least a month but not more than a year. If the duration is long enough, I don't think it is a big problem if active users are occasionally logged out. This happens to me with many of the services I use. |
Fixes #8949. We agreed on logging inactive users out after three months and active users after one year, Slack thread: https://hypothes-is.slack.com/archives/C4K6M7P5E/p1726753077108739?thread_ts=1726473609.158389&cid=C4K6M7P5E
Fixes #8949. We agreed on logging inactive users out after three months and active users after one year, Slack thread: https://hypothes-is.slack.com/archives/C4K6M7P5E/p1726753077108739?thread_ts=1726473609.158389&cid=C4K6M7P5E
Related: #8948
Inactive h users get logged out after seven days when their auth ticket expires, whereas active h users get logged out every thirty days when their auth cookie expires.
Both seven days and thirty days are far too aggressive: the inconvenience to our users (and likely resulting negative effect on user retention) for outweighs any improved security we might be getting by logging users out so often.
The text was updated successfully, but these errors were encountered: