Do you want to track authentication status :
// Register the callback to be fired every time auth state changes var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com"); ref.onAuth(function authDataCallback(authData) { if (authData) { console.log("User " + authData.uid + " is logged in with " + authData.provider); } else { console.log("User is logged out"); } });
Please note that you are not using AngularFire authentication wrappers. Although your approach will authenticate the user, you will need to notify Angular of the updated scope (see $timeout() ). If you prefer not to do this yourself, look at the AutumnFire wrappers, in particular $onAuth()
source share