Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

171
Visualizações
How to link to other AUTH Providers React js
function facebookSignIn(type, username) {
  const facebookProvider = new FacebookAuthProvider();
  const provider = new GoogleAuthProvider();
  return signInWithPopup(auth, facebookProvider)
    .then(async (result) => {
      console.log(result);
      const cred = getAdditionalUserInfo(result);
    })
    .catch((error) => {
      console.log(error);
    });
}

function googleSignIn(type, username) {
  const googleProvider = new GoogleAuthProvider();
  const provider = new FacebookAuthProvider();
  return signInWithPopup(auth, googleProvider).then(async (result) => {
    console.log(result);
    const cred = getAdditionalUserInfo(result);
  });
}

After signIn with google I want to link that account with Facebook so the user can login with Facebook later .Can anyoone help me with the flow How to achieve

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In my experience you will not be able to automatically link Facebook auth through Google Auth. When a user authenticates with Google, it's Google validating the email/password of this gmail account. Facebook has nothing to do with it. If you want your user to also auth in Facebook and link this auth method with your current user, I would suggest to maybe allow him to add a new authentication method under its profile details. However, it is highly unlikely that a user will use more than 1 auth method.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda