Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how AuthGuardService works #589

Merged
merged 1 commit into from
Nov 3, 2020
Merged

Change how AuthGuardService works #589

merged 1 commit into from
Nov 3, 2020

Conversation

Senyoret1
Copy link
Contributor

Did you run make format && make check?
The go code was not changed. npm run lint and npm run build were used.

Changes:

  • The way in which the service in charge of redirecting the user to the login page when unauthorized was changed. Previously, it checked the auth state before allowing the user to navigate, which made the app slower to respond during the first navigation and provided a very bad UX if the backend was unavailable. Now the API service is the main responsible of checking if the user is unauthorized and redirecting to the login page, while AuthGuardService now only redirects the user if it is already known that the user is unauthorized. This makes the app appear to work faster at launch, especially while using slow remote connections, and prevents problems which made the manager to stay without content for a long time waiting for the backend to respond.

How to test this PR:
Use the manager with and without the auth option active in the hypervisor. Opening any internal page without logging first should make the manager redirect the browser to the login page. Also, if the login page is opened while logged or while the auth option is not active, the manager should redirect the browser to the visor list.

@jdknives jdknives merged commit 7b0b85b into skycoin:develop Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants