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

Login form is briefly flashing #13

Open
heyarne opened this issue Jul 9, 2018 · 1 comment
Open

Login form is briefly flashing #13

heyarne opened this issue Jul 9, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@heyarne
Copy link
Owner

heyarne commented Jul 9, 2018

To reproduce:

  1. Login
  2. Open some link in the app, for example an album
  3. Copy the url
  4. Paste it into a new tab

Behavior:
Before being redirected you can briefly see the login form after the loading spinner.

Expected behavior:
The loading spinner should be the only thing we see.

@heyarne heyarne added the enhancement New feature or request label Jul 9, 2018
@heyarne
Copy link
Owner Author

heyarne commented Aug 1, 2018

This is because the app finishes the boot process after we have verified our credentials (or made sure there aren't any. The relevant code is here:

(defn is-booting?
"The boot process starts with setting up routing and continues if we found
previous credentials and ends when we receive a response from the server."
[db _]
;; so either we don't have any credentials or they are not verified
(or (empty? (:current-route db))
(and (not (empty? (:credentials db)))
(not (get-in db [:credentials :verified?])))))

As soon as we have credentials, :events/logged-in is fired, which only then redirects, thus causing the flashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant