Thanks! Glad it helps :) Sorry I don’t know your bug :(
Chris Esplin
1

Hey Chris! I’m back! I hope I don’t annoy you. The previous bug was solved when I minified all my JS scripts (Don’t know why).

I have a new problem, though.

Linking Facebook and Google doesn’t work in production (I can only see Google on the providers row) but it works on my local machine. Did I miss something? There’s no error on the console either. Here’s my full code:

function signInWithFacebook()
{
 var provider = new firebase.auth.FacebookAuthProvider();
 provider.addScope(‘public_profile,email’);

firebase.auth().signInWithPopup(provider)
 .catch(function(error) {
 if (error.code === ‘auth/account-exists-with-different-credential’) {
 // notify user
 
 firebase.auth().signInWithPopup(new firebase.auth.GoogleAuthProvider())
 .then(function(result) {

result.user.linkWithCredential(error.credential) 
 .catch(function(error) {
 console.log(‘Account linking error’, error);
 });
 });

}
 });
}

Thanks in advance.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.