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

Unexpected session expiry #2690

Open
xaur opened this issue Dec 10, 2021 · 4 comments
Open

Unexpected session expiry #2690

xaur opened this issue Dec 10, 2021 · 4 comments

Comments

@xaur
Copy link

xaur commented Dec 10, 2021

I'm reading through a long tree of comments and periodically a "Session expired" modal pops up in response to my actions (comment upvotes) and asks me to log in. I must add that it eats a lot of CPU to do so.

I cancel the modal and refresh the page or open the same link in another tab, and remain logged in, so I guess it's a false error. There appears to be "page session" and "login session" with different timeouts.

@victorgcramos
Copy link
Member

Hey @xaur the login is required in order to renew your CSRF token, hence the modal is displayed for every action that requires a valid CSRF. See #2541. On the other tab, the login is still active because you were never logged out, but it will also display the error message for expired sessions. Thanks.

@xaur
Copy link
Author

xaur commented Dec 14, 2021

On the other tab, the login is still active because you were never logged out, but it will also display the error message for expired sessions.

Sorry I don't quite follow, but let me reword what I observed:

  1. I opened a proposal with maany comments and started slowly reading and voting on them
  2. At some point I would get a "Session expired" modal
  3. I ignore the modal and refresh the page (or ignore it and open a new tab)
  4. I am still logged in and can continue to vote on comments

It is confusing to see the modal it if my session is not really expiring.

@victorgcramos
Copy link
Member

victorgcramos commented Dec 14, 2021

hmm can you give us a concrete example or some links of this happening? How long did your "slowly reading" take? Was it like more than one day? Was it displayed during your session (while you navigate without taking more than 24h)? Do you have your localStorage enabled on your env?

@xaur
Copy link
Author

xaur commented Dec 14, 2021

The proposal link was this.

I don't remember how long I had the browser tab open at this point, it could have been less or more than 24h, or both. I'm pretty sure I had instances when the popup appeared after like an hour or less of the tab being open.

I just "got rid" of it with page refresh and continued comment voting, because I knew the session must be longer.

localStorage is enabled and without it Politeia won't load. Firefox reports Politeia consumes 44 KiB of data as of writing.

Let me know if I can provide anything else to hunt it down.

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

No branches or pull requests

2 participants