Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda