Can anyone exactly give example how to merge multiple auth provider in firebase cause in firebase documentation also there is no exact code how to do it.. This is the exact error i m 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.
1 Answers
The Firebase documentation on Linking Multiple Auth Providers to an Account on Android contains all the relevant code snippets you should need. If you'd like to see the context of that code, clicking the file name under each snippet (for example MainActivity.java
) takes you to the repo that has the full working code.
For an even more complete example, you can have a look at FirebaseUI for Android, which contains a complete UI for most authentication flows and which supports upgrading anonymous accounts through account linking. For example, see this code for upgrading an anonymous account to an email+password account.
If you're having a hard time making these work in your own application, please update your question to show what you've already tried.