react-redux-firebase: bug(profile) inconsistent profile isLoaded, isEmpty states

Do you want to request a feature or report a bug?
Bug

What is the current behavior? In one of the prop states during login process, I get such result:

no auth: isLoaded(auth) true isEmpty(auth) true isLoaded(profile) true isEmpty(profile) true after login pressed isLoaded(auth) false isEmpty(auth) true isLoaded(profile) false isEmpty(profile) true [corrupted] isLoaded(auth) true isEmpty(auth) false isLoaded(profile) true isEmpty(profile) true on next prop, it is auto fixed: isLoaded(auth) true isEmpty(auth) false isLoaded(profile) true isEmpty(profile) false

However this corrupted state means that user is authenticated but profile is not found (profile path existed in database even before login).

What is the expected behavior? Corrupted state should not occur. In example, in my app I perform redirect if user is auth but does not have an entry in database.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups? 2.0.10

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

That is a GREAT point with having profile set to loaded false by the LOGIN action.

Going to change that now, and it should be ready for the next v2.0.0 pre-release.