msupply-foundation / openmsupply-client

Someone should really write a description for this repo.
2 stars 0 forks source link

Auth error update on login #1237

Closed mark-prins closed 2 years ago

mark-prins commented 2 years ago

The localStorage setting of /auth/error is being set to "Unauthenticated" when the cookie expires. When logging in, this is unset by the line setError(store ? undefined : AuthError.NoStoreAssigned);

The logic could be improved - if the login was unsuccessful then the error should be AuthError.Unauthenticated rather than AuthError.NoStoreAssigned