火力地堡AngularFire Facebook的登录没有登录可传输错误 [英] Firebase AngularFire Facebook Login no login transports available error

查看:276
本文介绍了火力地堡AngularFire Facebook的登录没有登录可传输错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用火力地堡的AngularFire,并试图用一些code我的文档中找到为Facebook登录登录。

I'm currently using Firebase's AngularFire and trying to login with some code I found in their documentation for facebook logins.

这是我的html code(带NG即可启动登录):

This is my html code (with ng-click to start login):

 <a ng-click="loginWithFacebook()" class="btn btn-block btn-social btn-facebook">

这是我的angularjs code样子(我已经设置了登录控制器):

This is what my angularjs code looks like (I've set up a login controller):

 var app = angular.module("loginApp", ["firebase"]);

 app.controller("loginCtrl", function($scope, $firebaseObject) {
 var ref = new Firebase("firebaseUrl");

$scope.loginWithFacebook = function() {
    ref.authWithOAuthPopup("facebook", function(error, authData) {
    if (error) {
        console.log("Login Failed!", error);
        alert("That didn't work");
      } else {
        console.log("Authenticated successfully with payload:", authData);
        document.write("You're logged in!");
      }
    });
};

所以,当我点击,按钮的作品,除了它不断给我这个错误消息:

So when I click, the button works except it keeps giving me this error message:

错误:没有登录请求方式传输可用。
   在错误(原生)
   在永贵( https://cdn.firebase.com/ JS /客户/ 2.2.4 / firebase.js:139:1271
   在 https://cdn.firebase.com/js/客户端/ 2.2.4 / firebase.js:160:141

Error: There are no login transports available for the requested method. at Error (native) at yg (https://cdn.firebase.com/js/client/2.2.4/firebase.js:139:1271) at https://cdn.firebase.com/js/client/2.2.4/firebase.js:160:141

我已经采取了火力的文档中一看,错误信息,并解释是pretty神秘的,我不知道这意味着什么。

I've taken a look in the documentation for firebase, and the error message and explanation is pretty cryptic and I have no idea what it means.

有人能告诉我怎么回事,我如何使用Facebook的能够登录并调用Facebook的弹出?

Could someone tell me whats going on and how I can be able login using Facebook and invoke a Facebook popup?

推荐答案

刚刚意识到我仍然有这个问题的答复:

Just realized I still have this question unanswered:

其实,我意识到,这是仅仅因为我没有一个Web服务器用来处理API调用火力地堡,这是我的一个愚蠢的错误,并让他们了解我在这里把这个留给未来的火力地堡用户你将不得不要么使用的NodeJS /导轨或其他后端框架来处理API的调用或使用类似Github上的页面只承载您的code网上。

I actually realized that it was merely because I didn't have a Web server set up to handle API calls to Firebase, it was a silly mistake on my part and I will leave this here for future Firebase users so that they understand that you would have to either use nodejs/rails or other backend frameworks to handle API calls or use something like Github Pages to just host your code online.

这篇关于火力地堡AngularFire Facebook的登录没有登录可传输错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆