Authentication using Facebook at first and then Google causes an error in Firebase for Android

后端 未结 7 933
醉梦人生
醉梦人生 2020-11-29 03:30

As I understand from the Firebase Docs, if a user authenticates his account with a credential, he should strictly login by using the same credential if the credential is not

7条回答
  •  佛祖请我去吃肉
    2020-11-29 03:57

    I finally ended with this logic:

    If user try to sign in with Facebook, but user with given email already exist (with Google provider) and this errors occures:

    "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, just ask user to loging using Google (and after it silently link Facebook to existing account)

提交回复
热议问题