I have an authorized user, and trying to sign him out after click the button. But after signOut method, the current user not null. And after reopen app user automatically logged in.
The sign in method is
signInWithEmailAndPassword
That what im get from log
D/FirebaseAuth: Notifying auth state listeners about a sign-out event.
D/FirebaseAuth: Notifying id token listeners about a sign-out event.
binding.signOut.setOnClickListener {
FirebaseAuth.getInstance().signOut()
System.exit(0)
}
CodePudding user response:
You are using Java code for SignOut. Try this instead Firebase.auth.signOut()
.
CodePudding user response:
The problem was solved by a remove System.exit(0)
. I think signOut event is async, and cannot be able to do while system.exit shutting down app