ManPhamQuang / COSC2769-rmit

Further web programming - COSC2769
cosc-2769-rmit.vercel.app
MIT License
0 stars 0 forks source link

Bug/handle expire token #104

Closed dangvuthang closed 3 years ago

dangvuthang commented 3 years ago

Changelog

How to test

  1. Navigate to config.env in backend and change the field EXPIRES_IN=7s (Token will expire in 7 seconds instead of 2 days to check)
  2. Start backend and frontend
  3. Try to login, or signup
  4. Navigate to different pages and observe if after 8s, the alert will appear and inform that the session has expired
  5. Try to refresh the page before the token expired and see if the website correctly logout after the remaining time