Skip to content

🎨 [Frontend] UX Cookie Expiration Date #6066

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

Merged

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jul 16, 2024

What do these changes do?

reported by @newton1985 .

When a computer goes into hibernation, the browser's setTimeout functions, along with other JavaScript timers, are paused. This is because the computer essentially saves the state of everything to disk and then powers off, halting all running processes including the browser.

In order to overcome the long setTimeout issue with hibernation (which was the case for the Cookie Expiration workflow), this PR changes the mechanism. We will now first set the expirationDate as a property and check every minute where we are with regards to the Expiration Date. If the user hibernates and comes back, this every minute check will kick again the continue with the workflow.

Animation with the cookie expiring in 15' and 1" check interval (after logging in, I Sleep the computer for a few seconds):
CookieExpiration

Related issue/s

How to test

Dev-ops checklist

@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jul 16, 2024
@odeimaiz odeimaiz added this to the Tom Bombadil milestone Jul 16, 2024
@odeimaiz odeimaiz self-assigned this Jul 16, 2024
@odeimaiz odeimaiz changed the title expirationDate property 🎨 [Frontend] UX Cookie Expiration Date Jul 16, 2024
@odeimaiz odeimaiz marked this pull request as ready for review July 16, 2024 11:12
@odeimaiz odeimaiz requested review from jsaq007 and ignapas as code owners July 16, 2024 11:12
@pcrespov
Copy link
Member

pcrespov commented Jul 16, 2024

Q: Instead of asking the user to logout, why not to logout the user automatically and show the login page with "session expired. Please login again" as in other tools

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Comment above.

@odeimaiz
Copy link
Member Author

Q: Instead of asking the user to logout, why not to logout the user automatically and show the login page with "session expired. Please login again" as in other tools

@pcrespov
That's exactly what happens 1' before expiring.

@odeimaiz odeimaiz enabled auto-merge (squash) July 16, 2024 11:32
@odeimaiz odeimaiz merged commit 3fc3a4b into ITISFoundation:master Jul 16, 2024
50 checks passed
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Jul 17, 2024
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 15, 2024
67 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants