Reputation: 11
I want to logout the user from the app....if I delete the user from Firebase auth console.
@Override
protected void onStart() {
super.onStart();
if (FirebaseAuth.getInstance().getCurrentUser()!=null)
{
Intent intent = new Intent(PhoneActivity.this,MainActivity.class);
startActivity(intent);
finish();
}
}
Upvotes: 1
Views: 289
Reputation: 317968
If you delete the user from the console, the user will be signed out after less than one hour. That one hour is how long the user's ID token (used for authenticating with Firebase services) remains valid. When the user is deleted, they will no longer be able to refresh that token, which means they are effectively signed out and unable to do anything with their old token.
There is no way to accelerate this process if you are just deleting the user using the console - you have to wait for that ID token to expire (unless you want to implement your own backend components that manage the user session).
Upvotes: 1