I’m trying to authenticate user using facebook through firebase
but getting [object Object] error.
My code for login is
facebookLogin(): void {
this.fb.login(['email']).then( (response) => {
const facebookCredential = firebase.auth.FacebookAuthProvider
.credential(response.authResponse.accessToken);
firebase.auth().signInWithCredential(facebookCredential)
.then((success) => {
alert("Firebase success: ");
this.userProfile = success;
})
.catch((error) => {
alert(error);
});
}).catch((error) => {alert(error); });
}
Any help?