Marija-Kov / Workout-Mate

A workout journal with email authentication and password reset option as well as search filter, pagination, profile customization and data download features. Rate-limited and tested.

Home Page:https://workout-mate.onrender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve auth

Marija-Kov opened this issue · comments

  • Move auth details out of global state.
  • Should choose an alternative to localStorage as well.

As is, the app needs to check localStorage for user item every time it makes a server request and persistent user state is preventing it from doing it. That results in fulfilling unauthorized requests.
On the other hand, some parts of the UI (Navbar) depend on user state persistence - they appear broken if user item is removed from the localStorage in between renderings.