I’m working on a project in Flutter. I use this code:
_googleAuthProvider.setCustomParameters({'prompt': 'select_account'});
UserCredential userCredential;
if (kIsWeb) {
userCredential = await _firebaseAuth.signInWithPopup(_googleAuthProvider);
} else {
userCredential =
await _firebaseAuth.signInWithProvider(_googleAuthProvider);
}
On web I can choose which account I want to log in with. On mobile (iOS & Android) I don’t get this choice and automatically log in with the previous logged in user.
How can I ensure that I can choose which account I log in with on mobile as well?
I tried several things including changing the customParameters.
2
Answers
This worked for me.
Use this Method
}
When you click on logout use this