I've looked up questions answers, but not found correct solution.
Here is the issue: I've already signed up with email/password, then I signed out. Then I tried sign in via facebook that has same email address, then it returned this error message.
"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address."
What I want is merge(link) the facebook account with the existing one. In Firebase documentation, it requires the previous account pre logged in to link with the new one.
user.link(with: credential) { (user, error) in
// ...
}
But in the login page, there is no current user logged in.
Please suggest me the best way to solve this issue.
