Android Question FirebaseAuth Google-Facebook

Stefano Di Chiano

Active Member
Licensed User
Hi,
I'm having a couple of issues with the firebaseauth library:
  • let's say I sign in with google. If I sign out and then I click on the sign in button again, it doesn't let me choose a new profile, but it enters automatically on the previous one. Is it supposed to work that way? Is it possible to disable this option and force the reauthentication every time someone click on the sign in button?
  • I was testing if all the sign in methods worked. I signed in with google and it worked (except for the previous point). I signed out and tried to sign in with facebook but it failed and the following line in the logs showed:
    error: com.google.firebase.auth.FirebaseAuthUserCollisionException: An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.
    . So if I understand correctly, I can't log with two different methods using the same email, is that right? Can I force it somehow? Just to be sure that the facebook login works.
EDIT: now that I tried the facebook login with the same email as the google method, it doesn't even let me change user. It automatically try to login with the previous one just to signal the error later in the logs.

Thanks.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is the browser behavior. You can try to sign out from Google in the browser

I was testing if all the sign in methods worked. I signed in with google and it worked (except for the previous point). I signed out and tried to sign in with facebook but it failed and the following line in the logs showed:
The only thing that you can do is to delete the user in the developer console.
 
Upvote 0

Stefano Di Chiano

Active Member
Licensed User
I was able to solve the first problem. Now whenever I sign in with google it asks with which account I want to do it. Now I have the same issue with the facebook sign in method though.

For the second problem I found the setting on firebase console that allow me to sign in with different methods even if using the same email. The problem is that if I now sign in with facebook I cannot get the email. I saw other threads talking about this issue but I didn't find a solution.
Anyway, correct me if I'm wrong, it is probably better to turn off that setting for security reasons.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…