lemeryfertitta / Climbdex

Search engine for training board climbs
https://climbdex.com
MIT License
50 stars 14 forks source link

Display error when cookies are disabled and login is attempted #83

Open lemeryfertitta opened 3 months ago

lemeryfertitta commented 3 months ago

The login feature currently uses cookies to store the token, so when cookies are disabled logging in does not work, but it fails silently. Better to show an error that explicitly states cookies must be enabled to use the logged in functionality. Ideally, this can happen when the user clicks the login button to avoid even showing the modal. One easy way to see if cookies are enabled is to write to a test cookie, check its value to see if the write worked, then cleanup the cookie if so.