How To Make Android Google Sign In Button To Just Login And Not Register With Firebaseauth?
Solution 1:
BUT when I click on an account that is not in my Firebase Authentication it's get created!
This is what the documentation that you have linked in your question does. When you choose an account, doesn't matter if you have signed in earlier or not, it gets Google account details and then creates the Firebase account.
What I want is when I click on an account that doesn't exist in my Firebase Authentication inform the user about that it's not possible to use that account because is not registered yet.
To solve this, everytime a user signs in with user and password, create a record in Cloud Firestore or Firebase realtime database to keep track of each user of your app. Once a user tries to sign-up, just check if the user already exists or not. If it exists, do your logic accordingly and if not, display the message you want. But remember, informing the user that "it's not possible to use that account because is not registered yet" it's not quite correct since this is what the user what is trying to do, to create an account.
Post a Comment for "How To Make Android Google Sign In Button To Just Login And Not Register With Firebaseauth?"