Hi,
If your Facebook and firebase configurations are all ok but the auth event is not raising or if you are getting An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address. error message then this tutorial is for you.
There are many posts in this forum regarding facebook login problem. And 99% of that doesn't have a solution. And there are some fixes like one of those is deleting authenticated user from firebase console. So you have to delete that user from firebase console before signing out.
So here is the solution follow these simple steps,
If your Facebook and firebase configurations are all ok but the auth event is not raising or if you are getting An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address. error message then this tutorial is for you.
There are many posts in this forum regarding facebook login problem. And 99% of that doesn't have a solution. And there are some fixes like one of those is deleting authenticated user from firebase console. So you have to delete that user from firebase console before signing out.
So here is the solution follow these simple steps,
- Login to firebase console
- Click on the firebase app
- Go to Authentication tab
- Go to sign-in method
- Scroll down to Multiple accounts per email option
- Click on change and you will see this popup
- Now choose Prevent creation of multiple accounts with the same email address and save it.
- Now before signing out delete that user info from firebase as follows,
B4X:If auth.CurrentUser.IsInitialized Then Dim j As JavaObject = auth.CurrentUser j.RunMethod("delete",Null) 'for iOS (B4I) 'Dim no As NativeObject = auth.CurrentUser 'no.RunMethod("deleteWithCompletion:",Null) End If facebook.SignOut auth.SignOutFromGoogle
- That's it.
Last edited: