如何通过localhost上的Firebase Google Auth进行身份验证

时间:2020-04-18 21:36:46

标签: firebase firebase-authentication emberfire

我正在用emberfire建立一个站点并使用Firebase。关于凭据的所有设置似乎都设置正确,在本地开发时我可以读取/写入firebase数据库,但是每次我尝试通过Google Popup进行身份验证时,它都会列出我的Google帐户,并且在我选择我的帐户时也可以正常显示将此错误对象归为错误:

code: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."

我认为我只是在某个地方缺少设置,但是在我一生中我找不到它。这是获取弹出窗口和响应的代码:


    const provider = new firebase.auth.GoogleAuthProvider();
    this.firebaseApp.auth().then(auth => {
      /* Firebase SDK calls */
      auth.signInWithPopup(provider).then(function(response) {
        console.log(response);
      }).catch(function(error) {
        console.log(error);
      });
    });

1 个答案:

答案 0 :(得分:0)

我将EmberJS与emberfire一起使用。

在我的环境中,我有enter_loop,并且在删除该身份验证时有效,因此它必须是所使用的适配器之一。

相关问题