Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!