I am using Firebase Google Authentication services. Authentication is working fine, But the problem is that when I sign In with google auth, credentials get saved. So after every logout, I can not be able to choose an email for login. It directly login me into the app. So it becomes a problem for me when I want to login with another Gmail account.
Code to achieve the credentials page.
google_sign_in_btn.setOnClickListener {
signIn()
}
...
private fun signIn() {
val signInIntent = mGoogleSignInClient.signInIntent
startActivityForResult(signInIntent, 234)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == 234)
{
val task = GoogleSignIn.getSignedInAccountFromIntent(data)
try
{
val account = task.getResult(ApiException::class.java)
if (account != null) {
firebaseAuthWithGoogle(account)
}
}
catch (e:ApiException) {
}
}
}