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

381
Views
Problem doing SignOut in firebase (email method) (react / firebase)

I am having the following problem that I am noticing at this stage of my application, when I signOut with one account, and then I decide to log in with another when executing actions, it keeps bringing the credentials of the first one. But if I signOut again and log in again with this last account, it already brings me the correct credentials. What is happening here? I do not understand and take me with a mode of clearPersistance, but I understood that it has no use for what I need.

    useEffect(() => {
    onAuthStateChanged(auth, async(logFirebase) => {
      if (logFirebase) { 
        sendEmailVerification(logFirebase)   
        setUsuarioGlobal(logFirebase);
        setUserMail(logFirebase.email);
        if (!logFirebase.emailVerified) {
          let intervalVerified = setInterval(() =>{
            setEmailVerificated(logFirebase.emailVerified)
            logFirebase.reload().then(ok =>{
              if(logFirebase.emailVerified === true){
                setEmailVerificated(logFirebase.emailVerified)
                clearInterval(intervalVerified)
              }
            })
          }, 5000)
        }
      } else {
        setUsuarioGlobal(null);
      }
    });
  }, []);


 const handleSignOut = () => {
    signOut(auth);
  };

signInWithEmailAndPassword(auth, email, password)
        .catch((error) => {
          if (error.code === "auth/user-not-found") {
            setErrorMsg("Email no encontrado, registrate!");
          }
          if (error.code === "auth/wrong-password") {
            setErrorMsg("Contraseña incorrecta!");
          }
about 4 years ago · Juan Pablo Isaza
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!