angularfire: `AngularFireAuth.authState` does not fire

Version info

Angular: 8.2.14

Firebase: 7.8.0

AngularFire: 5.4.0-5.4.1

Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Failing test unit, Plunkr, or JSFiddle demonstrating the problem: https://stackblitz.com/edit/angular-lgfgbl

Steps to set up and reproduce

  1. Fill your Firebase config in app.module.ts
  2. Run
  3. Click “Sign in with Google”

Sample data and security rules: none

Debug output

** Errors in the JavaScript console **: none

** Output from firebase.database().enableLogging(true); **: not applicable

** Screenshots **

Expected behavior

After redirected back from sign-in, you should be automatically to /main path.

Actual behavior

The app does not redirect you to /main path. (It does in @angular/fire@5.3.1.)

My observation

If I remove the line this.user$ = this.afa.authState; out from app.component.ts, it works! Doesn’t know why.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 18 (10 by maintainers)

Most upvoted comments

Fixed in 5.4.2

I’ve been able to create a simpler reproduction here: https://stackblitz.com/edit/angular-bk3qb6

It does not fix this 😉. That’s the reason why this issue and #2307 are separated.

Should be addressed in 5.4.1, sorry for the regression. Please reopen if you’re still having trouble after upgrading.