0
クラウド機能の中からユーザー(電子メール/パスワードの種類)を作成することは可能ですか? 私はこれを参照していますが、何も見つかりませんでした。クラウド機能のHttp TriggerでFirebase認証でユーザを作成できますか?
クラウド機能の中からユーザー(電子メール/パスワードの種類)を作成することは可能ですか? 私はこれを参照していますが、何も見つかりませんでした。クラウド機能のHttp TriggerでFirebase認証でユーザを作成できますか?
createUser()関数を使用してみましょう。
admin.auth().createUser({
email: "[email protected]",
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
私は現在、これをやろうとしているが、これは、その結果「要求されたリソースにアクセスするための十分な権限」。私はadmin.initializeApp(functions.config()。firebase)でアプリケーションを初期化しました。 – tonsteri