Started a project with firebase v3 and angularFire to auth users but things gone trouble. Sometimes I'm getting error "the server responded with a status of 400 (HTTP/2.0 400)" or the error is not showed and the promise $signInWithPopup is not resolved. Following my configs and the auth method:
Config:
<script>
// Initialize Firebase
var config = {
apiKey: "#########",
};
firebase.initializeApp(config);
</script>
Auth Method:
var auth = $firebaseAuth();
var provider = new firebase.auth.FacebookAuthProvider();
provider.addScope('public_profile');
provider.addScope('email');
// login with Facebook
auth.$signInWithPopup(provider).then(
function(firebaseUser) {
console.log("Signed in as:", firebaseUser.uid);
$state.go('app');
}
).catch(function(error) {
console.log("Authentication failed:", error);
}).finally(function(e){
console.log("Authentication finally:", e);
});
Can anyone help me?