小编Roc*_*use的帖子

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

我需要在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);
Run Code Online (Sandbox Code Playgroud)

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

firebase.auth().createUserWithEmailAndPassword(email, password)
Run Code Online (Sandbox Code Playgroud)

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

firebase.Promise.all(registerRequests)
Run Code Online (Sandbox Code Playgroud)

其中注册请求是createUserWithEmailAndPassword promise

javascript firebase firebase-authentication

2
推荐指数
1
解决办法
1004
查看次数