vocdoni / ui-scaffold

Vocdoni's protocol UI
https://app.vocdoni.io
GNU Affero General Public License v3.0
5 stars 2 forks source link

Improve auth state #769

Closed selankon closed 1 month ago

selankon commented 1 month ago

Motivation

RemoteSigner class has a little difference with the normal Signer that is that getAddress function is asynchronous.

This provoked some errors when accessing protected routes causing a blink show of Create Organization view on an "already logged in with organization account".

To fix this I created an inner auth state to check if the RemoteSigner is loaded and has an address associated to it.

Whats done

Add necessary authentication states on the provider to fix blinking page bugs when login in

github-actions[bot] commented 1 month ago

🚀 Deployed on https://66f11f17cfd22bae97abd24e--vocdoni-app-dev.netlify.app

github-actions[bot] commented 1 month ago

🚀 Deployed on https://66f11f1a60bee9ae1f626ee1--vocdoni-app-stg.netlify.app

emmdim commented 1 month ago

@selankon I requested one minimal change and one explanation. Other than that LGTM, if you want to merge it and I am not available go ahead

selankon commented 1 month ago

@selankon I requested one minimal change and one explanation. Other than that LGTM, if you want to merge it and I am not available go ahead

This is done. I will dismiss the review because you are OoO today so we can merge