Makespace / members-app

Simplifying operations for Cambridge MakeSpace
MIT License
1 stars 2 forks source link

No longer possible to log out #46

Closed erkannt closed 4 months ago

erkannt commented 4 months ago

When I'm logged in the navbar shows be the 'Log in' link instead of 'Log out'. Logging out is therefore impossible.

Given that the only page we display to non-logged in users in the log-in page I would suggest we always display the 'Log out' link in the navbar. Treat the log-in page as an edge case and don't use the page-template on it. This would mean that the pages no longer need to carry around information of whether a user is logged in or not. That responsibility would live solely in the http handlers.

Lan2u commented 4 months ago

Treat the log-in page as an edge case and don't use the page-template on it.

Makes sense

Lan2u commented 4 months ago

It also seems possible to 'log-in' when already logged in - this should auto redirect though

Lan2u commented 4 months ago

Treat the log-in page as an edge case and don't use the page-template on it.

Makes sense

Looking at this again - it might instead of getting rid of the user from the page template embrace it more and use it to display something indicated who is currently logged in

Lan2u commented 4 months ago

image

Added the avatar of the currently logged in user to the top right. Fixed the log-out not displaying. Modified a few minor things with redirecting to the login page / redirecting to the home page when it makes sense (i.e. if you go to the login page and are already logged in then we now redirect to the home page)