In my app, user is registered and authenticated using firebase. All activities in the app is accessible for authenticated users only. But inside app, there is one activity(ActivityB) which is user based data. this activity is again restricted with email&password login(so that a person who didn't installed the app can check this activity from other user).
Suppose user1 is registered on the app and authenticted by firebase. He will be authenticated throughout entire app. when user2 access ActivityB, and he can access his own data. But when when he signout, I need user1 to be automatically authenticated back as before.
How can i do this?
Even if User1/user2 signout from ActivityB, user is signout from entire firebase Authentication.
what i have give is just signout command. But it doesnt work
public void signout (View v)
{
auth.signOut();
Intent i = new Intent(this,ActivityB.class);
startActivity(i);
}