PixelogicDev / Gruvee-Mobile

#WeAreGrüvee
MIT License
48 stars 11 forks source link

[Bug] onAuthStateChanged gets fired way too many times #50

Closed adilanchian closed 4 years ago

adilanchian commented 4 years ago

More info

https://firebase.google.com/docs/auth/web/start

Repro:

  1. Have a Firebase user created
  2. Make sure that user is logged out of device
  3. Select Sign In With Spotify
  4. Go through the deep link flow
  5. Check logs to see redux flow

Expected Results

The onAuthStateChanged listener in App.js SHOULD be triggered, but our logic to keep it from moving onto the SignInUser action

Actual Results

The onAuthStateChanged listener is fired in App.js and our logic to block it from continuing does not seem to work at all.

adilanchian commented 4 years ago

FIXED with our somewhat hacky way