molssi-seamm / seamm_dashboard

This is a web dashboard to be used with MolSSI's [Simulation Environment for Atomistic and Molecular Modeling](https://molssi-seamm.github.io) (SEAMM). This dashboard will allow users to view results of their calculations (jobs), keep track of their simulation procedures (flowcharts), and group their jobs into projects.
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

add message/redirect for invalid cookie #119

Closed janash closed 2 years ago

janash commented 2 years ago

This PR adds behavior for when an invalid cookie is encountered. This might happen if the jwt-secret-key the app is run with is changed while there is a cookie stored in the browser. The behavior that has been added is for two cases:

  1. If an invalid cookie is encountered and the user is in a browser, the dashboard will redirect the user to the logout page which automatically removes the invalid cookie and displays the message "You have been logged out."
  2. If the user is not in a browser, a message telling them their cookie is invalid is returned and that they should clear their cookie.
lgtm-com[bot] commented 2 years ago

This pull request fixes 1 alert when merging 80fb60d752e15d512d9443d0a5e66c9f0242316a into f2b2f1c87b0d394ba11348fd0e5bf4e790abb61e - view on LGTM.com

fixed alerts: