访问凭据回调值firebase

时间:2017-02-20 21:10:00

标签: firebase ionic-framework firebase-authentication

我正在尝试访问firebase凭据方法的回调值,但我没有成功

我试过了:

   $cordovaFacebook.login(["public_profile", "email", "user_friends"])
     .then(function(success) {
        console.log(success);
        var credential = firebase.auth.FacebookAuthProvider.credential(success.authResponse.accessToken);
        console.log(credential);
                        Auth.$signInWithCredential(credential).then(function(response) {
        console.log(response);
       })
      }, function (error) {
      console.log(error.errorMessage);
    });

enter image description here

但我只获得了console.log(凭证)和console.log(成功)的价值。

我认为这是一个愚蠢的错误,但我无法识别

1 个答案:

答案 0 :(得分:0)

来自文档

11-13

不确定 firebase.auth().signInWithCredential(credential).catch(function(error) { 的来源或Auth

Advanced: Handle the sign-in flow manually