Javascript 为什么';我的谷歌认证在Firebase中不起作用吗?

Javascript 为什么';我的谷歌认证在Firebase中不起作用吗?,javascript,callback,popup,firebase,google-authentication,Javascript,Callback,Popup,Firebase,Google Authentication,我根据Firebase在 但是,当我运行代码()时,在选择用户后弹出窗口变为空白,并且永远不会关闭。回调代码永远不会执行。你知道为什么这样不行吗 用于OAuth重定向的授权域: firetest-wadeziegler.c9.io logon.js function logonWithGoogle() { var promise = session.logonWithGoogle(); $.when(promise) .then(function (authData) {

我根据Firebase在

但是,当我运行代码()时,在选择用户后弹出窗口变为空白,并且永远不会关闭。回调代码永远不会执行。你知道为什么这样不行吗

用于OAuth重定向的授权域: firetest-wadeziegler.c9.io

logon.js

function logonWithGoogle() {
  var promise = session.logonWithGoogle();

  $.when(promise)
    .then(function (authData) {
      setTimeout(function() { window.location.replace('/') }, 0);
  }, function (error) {
    showMessageBox('Logon Failed', error);
  });
}
session.js var session=新会话()


问题在于调用代码以及表单中的单击缺少
preventDefault()
。点击后页面立即重新加载,但速度太快,我没有注意到。愚蠢的错误

<button onClick="logonWithGoogle(); return false /* prevent submit */">

<button onClick="logonWithGoogle(); return false /* prevent submit */">