Код, который вы показываете, взят из веб-клиента SDK , а не из Admin SDK. Согласно руководству , функция из SDK администратора:
firebase.auth().createUser({
email: email,
password: password
}).then(function(userRecord) {
// See the UserRecord reference doc for the contents of userRecord.
console.log("Successfully created new user:", userRecord.uid);
})
.catch(function(error) {
console.log("Error creating new user:", error);
});