Firebase facebook auth错误

时间:2016-09-17 21:39:26

标签: javascript cordova firebase firebase-authentication facebook-authentication

使用Firebase Auth登录时,cordova facebook authentication plugin出现问题。

这是我的错误: enter image description here

这是我的代码:

if (window.facebookConnectPlugin && (window.cordova && device.platform == 'iOS') || (window.cordova && device.platform == 'Android')) {
        console.log("using the plugin");
        facebookConnectPlugin.login(['public_profile'], function(result) {
          provider = firebase.auth.FacebookAuthProvider.credential(result.authResponse.accessToken);
          provider.addScope('public_profile');
          provider.addScope('email');
          Auth.firebaseAuth.$signInWithCredential(provider).then(function(authData) {
            // User successfully logged in
            console.debug(authData);
            console.log("logged in ionic");
          }).catch(errFn);
        }, errFn);
      }

1 个答案:

答案 0 :(得分:0)

发现问题。我需要在here上添加Android应用,然后使用此命令生成密钥哈希和输入:

keytool -exportcert -alias <alias> -keystore <path to app keystore> | openssl sha1 -binary | openssl base64