Javascript 使用AngularFire进行Firebase用户身份验证
我正在尝试使用AngularFire通过Github对用户进行身份验证,但不断出现错误: ref.authWithOAuthPopup不是一个函数 这是我的控制器代码:Javascript 使用AngularFire进行Firebase用户身份验证,javascript,angularjs,firebase,angularfire,Javascript,Angularjs,Firebase,Angularfire,我正在尝试使用AngularFire通过Github对用户进行身份验证,但不断出现错误: ref.authWithOAuthPopup不是一个函数 这是我的控制器代码: .controller('HomeCtrl', ['$scope', function($scope) { var ref = new Firebase("https://<MY-FIREBASE-APP>.firebaseio.com"); function authHandler(error, a
.controller('HomeCtrl', ['$scope', function($scope) {
var ref = new Firebase("https://<MY-FIREBASE-APP>.firebaseio.com");
function authHandler(error, authDat) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload: ", authData);
}
}
ref.authWithOAuthPopup("github", authHandler);
}]);
原来我使用的是旧版本或firebase本身。。。我使用的是1.0.18版,而当前的版本是2.2.9。你能创建一个JSFIDLE或jsbin来复制这个,以及你使用的AngularFire版本的详细信息吗?我想我不允许为我的项目创建JSFIDLE,但我的AngularFire版本是0.8.0