Skip to content

app.auth is not a function #1707

@rtm

Description

@rtm

Version info

Angular: 6.0.0

Firebase: 5.0.4

AngularFire: 5.0.0-rc.10

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

I receive the message:

app.auth is not a function

This occurs in the following code on the line return app.auth():

var AngularFireAuth = (function () {
  function AngularFireAuth(options, nameOrConfig, platformId, zone) {
    var _this = this;
    this.zone = zone;
    var scheduler = new angularfire2__WEBPACK_IMPORTED_MODULE_3__["FirebaseZoneScheduler"](zone, platformId);
    this.auth = zone.runOutsideAngular(function () {
        var app = Object(angularfire2__WEBPACK_IMPORTED_MODULE_3__["_firebaseAppFactory"])(options, nameOrConfig);
        return app.auth();
    });

app seems to be well-formed:

image

but it has no auth property. I am instantiating (or rather, Angular is instantiating) AngularFireAuth because it is injected into a service, which itself is instantiated quite early in the application life cycle. Was there some change in how soon the app is completely ready, including its auth property? Or is this possibly some kind of version conflict?

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