Reputation: 570
I am trying to authenticate the user through Github using AngularFire but I keep getting the error:
ref.authWithOAuthPopup is not a function
This is my controller code:
.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);
}]);
Upvotes: 0
Views: 137
Reputation: 570
Turns out I was using an older version or firebase itself ... I was using version 1.0.18 while the current version is 2.2.9.
Upvotes: 0