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

353
Visualizações
firebase twitter login error : auth/invalid-credential

I'm going to put a firebase-based Twitter login on a web page. As shown in Docs, we created an app on the Twitter developer portal, put the app key and app secret in the firebase column, respectively, and added the firebase's callback URL to the Twitter app.

When you try to run by pressing the login button, a rare appears with the following error code. auth/invalid-credential The supplied auth credential is malformed or has expired.

Do you happen to know what I did wrong? Can I also know the solution? JavaScript was used, and under the same conditions, Facebook and Google can log in well and retrieve user information.

Someone help me why Twitter is the only thing like this... I am desperate! Below, I put my Twitter login code and other screenshots together in case I need it.

$(document).on('click', '#twiter', function () {
var provider = new firebase.auth.TwitterAuthProvider();
firebase.auth().useDeviceLanguage();
firebase
    .auth()
    .signInWithPopup(provider)
    .then((res) => {
        /** @type {firebase.auth.OAuthCredential} */
        var token = result.credential.accessToken;
        var user = result.user;

        console.log(token)
        console.log(user)
        // ...
    }).catch((error) => {
        console.log(error)
        console.log(error.code)
        console.log(error.message)
    });

});

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
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