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

123
Vistas
Firebase user signOut doesn't work in react native

I'm building an app and I'm handling the authentication with Firebase. The signIn create user functions work in the intended way, but for some reason, the signOut function doesn't work. When the button for the SignOut is clicked, the user should be signed out, but instead, he stays signed in

const signOutUser = () =>{
        console.log(authentication.currentUser.email)//before calling this is test@test.com
        signOut(authentication)
        .then((result) => {
            console.log(result)
        })
        .catch((error) => {
            console.log(error);
        })
        console.log("entered sign out functions")
        console.log(authentication.currentUser.email)//after above code runs this is till test@test.com
    }

Could somebody please advise what I'm doing wrong?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

const signOutUser = () => {
    console.log(authentication.currentUser.email);
    signOut(authentication).then((result) => {
        console.log(result);
        console.log("entered sign out functions");
        console.log(authentication.currentUser.email);
    }).catch((e) => { console.log(e) })
}

or

const signOutUser = async() => {
    // add try catch if you want
    console.log(authentication.currentUser.email);
    const result = await signOut(authentication);
    console.log("entered sign out functions");
    console.log(authentication.currentUser.email);
}

You should await the signOut or write your code in then(). If this is still not working, you probably made a mistake with your signOut(authentication) function.

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