title: Why doesn't my Google authentication work in Firebase?
body: <p>I've modeled my Google logon after the example provided by Firebase at <a href="http://jsfiddle.net/firebase/a221m6pb/" rel="nofollow">http://jsfiddle.net/firebase/a221m6pb/</a></p>
  
  <p>However when I run my code (<em><a href="https://firetest-wadeziegler.c9.io/logon" rel="nofollow">https://firetest-wadeziegler.c9.io/logon</a></em>) the popup goes blank after selecting user and never closes. The callback code is never executed.  Any ideas why this isn't working?</p>
  
  <h2><strong>Authorized Domains for OAuth Redirects:</strong></h2>
  
  <p>firetest-wadeziegler.c9.io</p>
  
  <p><strong>logon.js</strong></p>
  
  <pre><code>function logonWithGoogle() {
    var promise = session.logonWithGoogle();
  
    $.when(promise)
      .then(function (authData) {
        setTimeout(function() { window.location.replace('/') }, 0);
    }, function (error) {
      showMessageBox('Logon Failed', error);
    });
  }
  </code></pre>
  
  <p><strong>session.js</strong>
      var session = new Session();</p>
  
  <pre><code>function Session() {
    this.firebase = new Firebase("https://glowing-inferno-3026.firebaseio.com");
    this.firebase.onAuth(function globalOnAuth(authData) { } );
  }
  
  Session.prototype.isLoggedOn = function() {
    return this.firebase.getAuth() != null;
  }
  
  // Returns Promise object
  Session.prototype.logonWithGoogle = function() {
    var deferred = $.Deferred();
  
    this.firebase.authWithOAuthPopup("google", 
      function (err, user) {
        if (err) {
            deferred.reject(err);
        }
  
        if (user) {
            deferred.resolve(user);
        }
      }
      , {
        remember: "sessionOnly",
        scope: "email,profile"
      });
  
    return deferred.promise();
  }
  </code></pre>