且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从身份验证数据库中删除匿名用户

更新时间:2023-12-05 22:49:22

当您将凭据与currentUser链接时,就已经登录了,不需要:

When you link the credential with the currentUser you are logged already, don't need for:

FIRAuth.auth()!.signIn

您保留匿名用户的UID.

You keep the UID of the anonymous user.

如果用户已经有一个帐户,在这种情况下,您需要:

If user already have an account, in this case you need to:

currentUser.delete()

然后使用提供的凭据登录

And then logIn with the credentials provided