更新时间:2023-12-05 17:16:04
您不能链接2个现有的Firebase用户.您只能将新凭据链接到现有用户.
在注册用户时,应仅使用电子邮件/密码凭据对匿名用户使用currentUser.linkWithCredential
,而无需先调用createUser.这基本上是将匿名用户升级为电子邮件/密码用户.
You can't link 2 existing Firebase users. You can only link a new credential to an existing user.
When you are registering the user, you should just currentUser.linkWithCredential
on the anonymous user using the email/password credential without calling createUser first. This is basically upgrading the anonymous user to an email/password user.