当前位置:  开发笔记 > 编程语言 > 正文

注册100个用户后,Firebase会阻止所有请求

如何解决《注册100个用户后,Firebase会阻止所有请求》经验,为你挑选了1个好方法。

我需要在Web应用程序中注册Firebase中的许多生成用户.我没有在Firebase的API参考中找到任何方法来在一个请求中执行此操作,因此我为每个生成的对电子邮件/密码调用createUserWithEmailAndPassword.注册100个用户后,我收到了auth/too-many-requests错误,由于Firebase阻止了来自设备的所有请求,因此无法发送30分钟或更长时间的请求.

如何防止在firebase控制台中阻止我的应用程序或在Web应用程序的代码中写入什么?我正在使用标准的firebase连接:

const config = {
apiKey: 'my-api-key',
authDomain: 'my-project.firebaseapp.com',
databaseURL: 'https://my-project.firebaseio.com',
storageBucket: 'my-project.appspot.com',
messagingSenderId: 'my-sender-id'};
firebase.initializeApp(config);

并使用createUserWithEmailAndPassword注册100个用户中的每一个:

firebase.auth().createUserWithEmailAndPassword(email, password)

我正在使用Promise.all调用所有请求

firebase.Promise.all(registerRequests)

其中注册请求是createUserWithEmailAndPassword promise



1> bojeil..:

我建议使用Admin node.js SDK.您将拥有特权访问权限,可以根据需要创建任意数量的电子邮件和密码用户,而不会受到限制. https://firebase-dot-devsite.googleplex.com/docs/auth/admin/manage-users

推荐阅读
TXCWB_523
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有