在 flutter 应用程序中合并 firebase 身份验证中的两个 uid

merge two uids in firebase authentication in flutter application

我能够成功通过 Facebook 进行身份验证,并且 Phone 在 flutter 应用程序的 firebase 身份验证中分别进行身份验证。

我想知道用户是否已经通过 Facebook 或 Phone 号码进行了身份验证,以及用户是否想将他的 phone 号码添加到 Facebook 身份验证记录或将 Facebook 身份验证添加到 phone号码认证记录,就是把这两个合并起来,同时维护firebase authUser的Single uid,这怎么可能?

通过将来自这些身份验证提供程序的用户凭据链接在一起,您所描述的内容在 Firebase 身份验证中是可能的。它记录在 account linking, and while that page is for Android, the same logic is available on Flutter under linkWithCredential and linkWithPhoneNumber.