Skip to content

DEV Implement Auto Logout #322

@prooflesben

Description

@prooflesben

Overview

The main objective of this ticket so that our app logouts out after a day of it staying open in someone's browser. The concrete implementation for this up to you but all of the code should be nested inside of the authContext.ts file just so our auth functionality stays in the same place. A recommendation for implementation would just to use a timer and a react hook to track how long the user has been logged in and after the timer hits zero call the logout function. The method to start the time and track things should be called inside of login after a successful login.

The desired time span the app can be open for now is going to be 8 hours.

This is a harder ticket with a lot of leeway of implementation and could be confusing so feel free to reach out to @prooflesben if you would like to pair program or have any questions answered.

Tasks

  • Create a timer to auto logout after a 8 hours of the app being open.
  • Have the code to trigger the auto logout inside of authContext.ts

Acceptance Criteria

  • App auto logs out after 8 hours(Could set this to 5 minutes for testing purposes)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions