Reputation: 13
Good day...I working with two applications, and both applications a user have to be logged in.The first application after logging in,there is a button on click of the button,it forwards the user to the second application login. So now the user is logged in two different applications. So how can i logout both application on click of a logout button. I am able to logout for one application only.
This is my Code to logout for an application
private void logOut() {
mAuth.signOut();
sendToLogin();
}
Upvotes: 1
Views: 183
Reputation: 1664
You can register a broadcast receiver in both applications. On clicking the logout button, you can send this logout broadcast. On receiving this logout broadcast in onreceive method of the broadcast receiver call mAuth.signOut().
Upvotes: 1