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

[SPIKE] As a user, I need to be timed out from my session (Research session timeout) #282

Closed
4 tasks done
hilvitzs opened this issue Sep 16, 2020 · 1 comment · Fixed by #364
Closed
4 tasks done
Assignees
Labels
Milestone

Comments

@hilvitzs
Copy link

hilvitzs commented Sep 16, 2020

Description:
Research needs to be done to determine how to initiate a session timeout from the front end.

Acceptance Criteria:

Tasks:

Notes:

Open Questions:

  • How do you check for user inactivity from the FE?
    -- Found a good solution for React
  • What needs to be sent to the BE in order to initiate a session timeout?
    • If React initiates, then sends a logout message to BE. If react does not initiate timeout, what happens? (Ryan to send Carl soemthing)

Findings

Backend
The backend will be the ultimate arbiter of session management. When the user logs in they will receive an HttpOnly cookie that is set to expire in 30 minutes. After that, with every interaction between the FE and BE, the BE will refresh the cookie, so it will extend the timeout time to another 30 minutes.

Frontend
The frontend will also have a timer that it will set when the user logs in. It will monitor user activity and reset every time a user interacts with the page. That means when a form field is filled out or changed, the FE timer will reset. Because this is not dependent on interactions with the BE, the FE will call the /v1/authorization-check endpoint whenever it resets the timer. This will serve to verify the user is still authenticated on the BE as well as refresh the cookie.

When the FE timer reaches 20 minutes (?) it will alert the user that the session will time out soon and give them the option to either extend the session or logout of the system. If the user chooses to extend the session, the FE will call the /v1/authorization-check endpoint to refresh the session. If the user elects to log out of the system it will call the /v1/logout endpoint to clear the session and log the user out of the system.

@hilvitzs hilvitzs added the dev label Sep 16, 2020
@hilvitzs hilvitzs self-assigned this Sep 16, 2020
@shubhi-raft shubhi-raft changed the title SPIKE - Research how to enable session timeout from Front End React App [SPIKE] - Research how to enable session timeout from Front End React App Sep 16, 2020
@shubhi-raft shubhi-raft changed the title [SPIKE] - Research how to enable session timeout from Front End React App [SPIKE] Research how to enable session timeout from Front End React App Sep 16, 2020
@lfrohlich lfrohlich changed the title [SPIKE] Research how to enable session timeout from Front End React App [SPIKE] As a user, I need to be timed out from my session (Research session timeout from Front End React App) Sep 30, 2020
@shubhi-raft shubhi-raft added this to the Sprint 6 milestone Oct 14, 2020
@shubhi-raft shubhi-raft changed the title [SPIKE] As a user, I need to be timed out from my session (Research session timeout from Front End React App) [SPIKE] As a user, I need to be timed out from my session (Research session timeout) Oct 14, 2020
@lfrohlich
Copy link
Collaborator

This is done

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

Successfully merging a pull request may close this issue.

4 participants