将注册用户从一个Firebase应用转移到另一个 [英] Transfer registered users from one firebase app to another

查看:240
本文介绍了将注册用户从一个Firebase应用转移到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的firebase应用程序具有注册用户列表.这些是通过电子邮件和电子邮件创建的.密码验证.

My firebase app has a list of registered users. These were created with Email & Password Authentication.

我想将Firebase数据和用户列表转移到另一个Firebase应用程序.

I want to transfer the firebase data and the list of users to another firebase app.

传输Firebase数据很简单,但是如何传输已注册的用户并保留其uid?

Transferring the firebase data is straightforward, but how can I transfer the registered users and keep their uid's?

这有可能吗?如果是,最好的方法是什么?

Is this possible and if so, what is the best way to do it?

推荐答案

您应该使用Firebase管理工具.

You should use the Firebase admin tools.

您可以使用以下命令安装管理工具:

You may install the admin tools using this command:

npm install -g firebase-tools

导出命令,该命令生成 AllUsers.json 文件:

Export command, that generates the AllUsers.json file:

firebase auth:export AllUsers.json --project projectId

在另一个帐户上,使用以下命令导入生成的文件.

On the other account use the following command to import the generated file.

firebase auth:import AllUsers.json --project projectId

这篇关于将注册用户从一个Firebase应用转移到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆