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

Cumulus 3624 #1135

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open

Cumulus 3624 #1135

wants to merge 14 commits into from

Conversation

vindigo
Copy link
Contributor

@vindigo vindigo commented Jun 28, 2024

Summary: Summary of changes

Addresses CUMULUS-3624: Active Session Timeouts - Inactivity Modal

Changes

  • Added Inactivity Modal component
  • Added unit test for Inactivity Modal

PR Checklist

  • Update CHANGELOG
  • Unit tests
  • Adhoc testing
  • Integration tests

@vindigo vindigo added Needs Review Looking for a reviewer and removed Work In Progress labels Sep 20, 2024
@jennyhliu jennyhliu added In Review and removed Needs Review Looking for a reviewer labels Sep 26, 2024
Copy link
Contributor

@jennyhliu jennyhliu left a comment

Choose a reason for hiding this comment

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

  1. Can you add a cypress test to verify the functionality?
  2. The Modal says 'We will close this session in 5 minutes. ', but after 5 minutes, the Session is not closed or log me out, and the modal window is still there. I click 'Continue Session', the modal window closes and the session is still there.

// Effect to handle showing the modal after 30 minutes of inactivity
useEffect(() => {
const checkInactivity = setInterval(() => {
if (Date.now() - lastKeyPress > 1800000 && !hasModal) { // 1800000 ms = 30 minutes
Copy link
Contributor

@jennyhliu jennyhliu Sep 26, 2024

Choose a reason for hiding this comment

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

Can we make the inactivity time configurable?

Copy link
Contributor

@jennyhliu jennyhliu Sep 26, 2024

Choose a reason for hiding this comment

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

What's the difference between this inactivity timeout and session timeout? How do they work together?
The launchpad session can timeout regardless this inactivity, is it correct? Does the launchpad Session get refresh when we click 'Continue Session'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you add a cypress test to verify the functionality?
I don't think this is necessary as the other modals do not have tests written for this so it shouldn't be a requirement. If it is necessary I would be happy to do it but will need to be shown how as I normally do not deal with Cypress.

The Modal says 'We will close this session in 5 minutes. ', but after 5 minutes, the Session is not closed or log me out, and the modal window is still there. I click 'Continue Session', the modal window closes and the session is still there.
In progress

Can we make the inactivity time configurable?
Done

What's the difference between this inactivity timeout and session timeout? How do they work together?
The launchpad session can timeout regardless this inactivity, is it correct? Does the launchpad Session get refresh when we click 'Continue Session'?

Currently the session timeout just keeps track if the user is logged in or not. I am not sure what this timeout is set for. The inactivity modal will keep track of the users activity. If there is no activity after 30 min then a pop up will show and a second timer will start. This second timer is set for 5 min. If the user wishes to continue the session then they will need to interact with the modal and select "Continue session" otherwise the user will be logged out. In the future the session timeout and the inactivity timeout will be merged but this will be addressed in another ticket.

app/src/js/App.js Outdated Show resolved Hide resolved
app/src/js/components/oauth.js Outdated Show resolved Hide resolved
app/src/js/reducers/index.js Outdated Show resolved Hide resolved
app/src/js/components/Modal/InactivityModal.js Outdated Show resolved Hide resolved
@jennyhliu
Copy link
Contributor

Additional comments:

  1. The session is still expired seconds after I click 'Continue Session'.
  2. The modal window appears in the login page.
Screenshot 2024-09-26 at 3 34 58 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants