In my project, google is already enabled but for some reason it does not appear in the popup, here I leave the google method that I am using in the Auten.js component.
google()
{
console.log("I am in google method.");
let provider = new firebase.auth.GoogleAuthProvider();
let promise = firebase.auth().signInWithPopup(provider);
promise.then(result => {
let user = result.user;
console.log(result);
firebase.database().ref('users/' + user.uid).set({
email: user.email,
name: user.displayName
});
});
promise.catch(e => {
let msg = e.message;
console.log(msg);
});
}
I think I'll leave it without google authentication because it sends me to a page that asks for my data and to pay something haha it doesn't matter it was just going to be an extra way to register but the conventional one is fine. Thanks a lot.