Posts

Showing posts from October, 2023

Unable to select a different account on Google login | Android Studio

Image
Problem: I have implemented Google Signing for the Android app. The user can successfully log in from the Google Login Button. This screen appears while selecting a Social Account:  So now the user has logged in successfully by selecting his/her account. Now, the user logs out and tries to sign in again by using Google Login Button. At this time, he is not asked with the option to choose an account, he is automatically logged in using the account he/she selected at the first time. At the time of logout, what should I do to clear the cache of the selected account? Solution: In Firebase documentation for Android, they only refer to the use of this: firebaseAuth .signOut() However, the next time the user logs in, the app will automatically select the previous email. To avoid this, you should use the following code as well: mGoogleSignInClient .signOut()