Skip to content

AngularFireAuth.authState does not fire #2309

@sarunint

Description

@sarunint

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/[email protected].)

My observation

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions