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

304
Views
How i can reset all the data when i signout() with firebase onr eact native?

I have a problem with my app, when I signout() and I want to create a new user, I still have some of the data of the previous user.

The app was coded by another developer (i have no contact with him) so I tried to find the problem.

there is also another problem with I logOut, I have this error

Uncaught Error in snapshot listener: [FirebaseError: Missing or insufficient permissions.]

my function logout :

// my button logout
const onLogout = () => {
    authManager.logout(currentUser);
    //dispatch(logout());
    props.navigation.navigate('LoadScreen', {
      appStyles: DynamicAppStyles,
      appConfig: DatingConfig,
    });
    setModalVisible(false);
  };
  const renderModalVisible = () => {
    setModalVisible(true);
  };


//then authmanager.logout()

const logout = (user) => {
  console.log('deco');
  const userData = {
    ...user,
    isOnline: false,
  };
  authAPI.updateUser(user.id || user.userID, userData);
  authAPI.logout();
};


//the authAPI.logout()
export const logout = () => {
  firebase.auth().signOut();

  RNFBAuth.auth().signOut();
};


it could also come from my persistent function but the process goes directly on the 'else'

const retrievePersistedAuthUser = () => {
  console.log('persiste');
  return new Promise((resolve) => {
    authAPI.retrievePersistedAuthUser().then((user) => {
      if (user) {
        handleSuccessfulLogin(user, false).then((res) => {
          // Persisted login successful, push token stored, login credential persisted, so we log the user in.
          resolve({
            user: res.user,
          });
        });
      } else {
        console.log('héééhoooooo');
        resolve(null);
      }
    });
  });
};
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!