This repository was archived by the owner on Mar 17, 2025. It is now read-only.
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
auth.onAuthStateChanged is not a function #743
Closed
Description
Version info
Angular: 1.5.5
Firebase: 3.0.3
AngularFire: 2.0.0
Other (e.g. Node, browser, operating system) (if applicable): N/A
Test case / Steps to Reproduce / Actual Behavior
The following code:
myApp.factory("Auth", ["$firebaseAuth",
function($firebaseAuth) {
var ref = firebase.database().ref();
var auth = $firebaseAuth(ref);
return auth;
}
]);
is producing the following error:
angular.min.js:formatted:3483TypeError: auth.onAuthStateChanged is not a function
at https://cdn.firebase.com/libs/angularfire/2.0.0/angularfire.js:1008:20
at Object.n [as promise] (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:133:427)
at Object.FirebaseAuth._initAuthResolver (https://cdn.firebase.com/libs/angularfire/2.0.0/angularfire.js:1001:26)
at Object.FirebaseAuth (https://cdn.firebase.com/libs/angularfire/2.0.0/angularfire.js:802:38)
at https://cdn.firebase.com/libs/angularfire/2.0.0/angularfire.js:790:28
at new <anonymous> (http://localhost:4000/auth/AuthCtrl.js:5:22)