How to logout a user so that the next login lets him chose an account? It’s like there is still some metadata stored somewhere because it always relogs into the last successfully logged in account.
I found the exact problem described in this thread but for JavaScript: Firebase logout not working
How can I implement the solution:
var provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({ prompt: 'select_account' });
in Java? Because as far as I understood, the JavaScript API is different from Java and I cannot directly create a GoogleAuthProvider() object.
2
Answers
if you are using firebase Authentication in your web app then you also need to give the user account delete option as per the user’s need. We can simply do it in firebase by just simply calling the firebase delete method
hope this helps
In Java, you can’t directly set custom parameters like in JavaScript. However, you can achieve the same effect by using the GoogleSignInOptions and GoogleSignInClient classes provided by the Google Sign-In library. Here’s how you can do it: