lukas-kratochvil / mafil-proband-safety-questionnaire

MAFIL - Proband Safety Questionnaire
https://mafil-proband-safety-questionnaire.vercel.app
The Unlicense
2 stars 0 forks source link

Handle login and logout correctly #15

Closed lukas-kratochvil closed 2 weeks ago

lukas-kratochvil commented 5 months ago

If I log in as an operator and then click the "back" button in the browser, I'm still logged in even though I'm on the Login page. What to do?

lukas-kratochvil commented 1 month ago

When an operator is logged in and refreshes the page (clicks F5 on the keyboard or clicks the browser's refresh button) it logs him out.

Sometimes hitting the browser's back button also logs operator out.

lukas-kratochvil commented 2 weeks ago

When an operator is logged in and refreshes the page (clicks F5 on the keyboard or clicks the browser's refresh button) it logs him out.

Sometimes hitting the browser's back button also logs operator out.

Solved in 24c688b, 3f193b1 and 08ce230 by correcting client-side routing in the MUI components. Using only react-router-dom Link component or navigate function from the useNavigate() hook for client-side routing.