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

132
Visualizações
Missing functions in Firebase auth V9

I'm facing a horrible issue with firebase auth. At this point, I'm completely and utterly stumped.

Whenever I try to call user.getIdTokenResult(), I get an error TypeError: undefined is not an object (evaluating 'n.getIdToken').

The user is defined. I log into the console before the function runs, and it always prints out a user. Plus, I'm calling the function in onAuthStateChanged.

What's even more strange is that it works perfectly on localhost, but once I push to production or even tunnel the domain, it stops working completely.

I have no idea what's going on.

It looks like this fellow faced the same issue: How to use the getIdToken() auth method in firebase version 9?. No solution, though.

It also looks like it only fails on Safari and iOS.

Code I'm running:

 auth.onAuthStateChanged(async (user) => {
    if (user) {
        console.log('user', user); // prints out a user object
        // Fails here
        const idTokenResult = await user.getIdTokenResult();
...
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