I'm trying to include a list of users (more than 50) through a specific function in Firebase. Here's my code:
Object.keys(newUsers).forEach((key) => {
console.log(newUsers[key]['name']);
admin.auth().createUser({
uid: key,
email: newUsers[key]['email']
password: newUsers[key]['InitialPwd'],
disabled: false,
emailVerified: false,
displayName: newUsers[key]['name'],
}).then((userRecord) => {
return console.log('Success');
}).catch(function(error) {
console.log("Error:", error);
});
});
And the error is (for each record):
{ Error: Error while making request: timeout of 10000ms exceeded. at FirebaseAppError.FirebaseError [as constructor] (/srv/node_modules/firebase-admin/lib/utils/error.js:39:28) at FirebaseAppError.PrefixedFirebaseError [as constructor] (/srv/node_modules/firebase-admin/lib/utils/error.js:85:28) at new FirebaseAppError (/srv/node_modules/firebase-admin/lib/utils/error.js:119:28) at /srv/node_modules/firebase-admin/lib/utils/api-request.js:117:23 at at process._tickDomainCallback (internal/process/next_tick.js:228:7) errorInfo: { code: 'app/network-timeout', message: 'Error while making request: timeout of 10000ms exceeded.' }, codePrefix: 'app' }
How can I solve this?