title: firebase onAuth() throwing: TypeError cannot read property 'auth' of undefined
body: <p>I'm using Firebase as my main backend solution and have created a service for dealing with auth throughout the app (since I started to use simpleLogin and now I'm trying to use their built in login methods, I figured it might be better to just make all that scoped before accessing it from the rest of the application).</p>
  
  <p>My firebase reference is working fine and so it is the auth methods.<br>
  But the listening methods onAuth() and offAuth() are throwing this error:</p>
  
  <pre>Uncaught TypeError: Cannot read property 'auth' of undefined - firebase-debug.js:9954</pre>
  
  <p>Is this a bug with firebase itself or does anyone see something I'm doing wrong?
  Tried to play around with angular versions and turning off other bower packages like angularfire and firebase-simple-login but have had no success so far.</p>
  
  <p>My auth service code is as follows and I'm not doing anything beyond defining my url on a .constant service.</p>
  
  <pre><code>    angular.module('myApp')
      .factory('auth', function (firebaseAPIUrl) {
  
        var ref = new Firebase(firebaseAPIUrl),
            onAuth = ref.onAuth,
            offAuth = ref.offAuth;
  
        onAuth(function (authData) {
          console.log(authData);
        });
  
        function getCurrentUser() {
          return ref.getAuth();
        }
  
        ...
  
        return {
          onAuth: onAuth,
          offAuth: offAuth,
          getCurrentUser: getCurrentUser,
          ...
        }
      }
  </code></pre>