Is it possible to create users (email/password type) from inside the Cloud Functions? I am searching for reference to this, but found nothing.
The createUser() function let's you do just that.
admin.auth().createUser({
email: "user@example.com",
emailVerified: false,
password: "secretPassword",
displayName: "John Doe",
photoURL: "http://www.example.com/12345678/photo.png",
disabled: false
})
.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);
});
https://firebase.google.com/docs/auth/admin/manage-users#create_a_user