无法在Cordova应用上使用Firebase Auth进行社交登录

时间:2017-06-10 11:10:46

标签: cordova firebase firebase-authentication

我正在尝试使用Google和Facebook登录我的Cordova应用上的Firebase。 我按照这个指南: https://firebase.google.com/docs/auth/web/cordova

但我仍然会收到此错误:

auth/operation-not-supported-in-this-environment

这是我的代码:

      var provider = new window.parent.firebaseRef.auth.GoogleAuthProvider();
      window.parent.firebaseRef.auth().signInWithRedirect(provider).then(function(result) {
        var token = result.credential.accessToken;

      }).catch(function(error) {
        var errorCode = error.code;
        var errorMessage = error.message;

        Materialize.toast(errorMessage, 4000);
      });

0 个答案:

没有答案