Is it possible to create users (email/password type) from inside the Cloud Functions? I am searching for reference to this, but found nothing.
Base on answer of @mike-brian-olivera I make a fucntion cloud you can call on front end
exports.register = functions.https.onCall((data, context) => {
const { email, pass } = data;
return admin
.auth()
.createUser({
email,
password: pass,
})
.then(userRecord => {
// See the UserRecord reference doc for the contents of userRecord.
console.log({ uid: userRecord.uid });
return { success: userRecord.uid };
})
.catch(error => {
return { error: error.message };
});
});