0

My app has authentication via Facebook/Firebase. Whole application is made by fragments and ofc one activity.

Case (simply):

There are 2 fragments : howToFragment and mainFragment .

I uninstalled app after clearing cache and signout from firebase and facebook.

In howToFragment, i check that is there already a user logged-in or not.

override fun onStart() {
    super.onStart()
    firebaseAuth = FirebaseAuth.getInstance()
    val user = firebaseAuth!!.currentUser
    if (user != null) {
        this.view?.let { Navigation.findNavController(it).navigate(R.id.action_howtoFragment_to_mainFragment) } // This will be navigated to main fragment.
    }

    /*firebaseAuth!!.signOut()
    LoginManager.getInstance().logOut()*/
}

Then i install app in debug mode. I see that user is logged-in and navigated to MainFragment. When i check the id of user, i see that it is my main facebook account id (ofc i made so many test with it, but never used for 2 week, it is not even logged-in facebook app)

After that, i close the app (not uninstall). When i open it again, i see that there is no signed in user, firebaseAuth is null. (i dont know how it signout, because there is no code for sign out in app) But facebook is log-in status.

I guess, i miss an obvious point, but what?

Is there a default user, or mis cache?

Santanu Sur
  • 10,997
  • 7
  • 33
  • 52
Hakan Erbaş
  • 139
  • 1
  • 10

1 Answers1

0

While i was trying to find solution, i got this question&answer.

Answer of question

Hakan Erbaş
  • 139
  • 1
  • 10