0

I have a FlutterFlow x Firebase setup at the moment and I want mobile auth to be the main method with an option to use traditional credential auth as the secondary method.

However, it looks like it's choosing either phone or email sign-in methods thus creating separate accounts and documents in Firebase and Firestore.

How can I get it to recognise that the two auth methods are already linked so that I can use either to authenticate the pre-existing account rather than it creating a separate account??


Testing 1

  • I first create the account (email provider) with a registration form.
  • Navigated to the auth page after registration for phone sign-in (primary auth method)
  • However, after phone sign-in an additional account is created with the phone provider in Firebase as well as an additional document in the users' collection in Firestore.

Testing 2

  • I then tried using phone sign-in to create the account.

  • Afterwards used a registration form to update that document in Firestore

  • However when I go to use email/PW auth to log-in (secondary auth method), it again creates an additional account with the email provider plus the additional document.


So Im stuck unable to have both methods link to same account.

I found this (linkWithCrendtial) but not sure how best to action it with a custom function.

Perhaps there may also be a workaround or another process to achieve this registration/authentication combination.

0 Answers0