答えて

1

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

+0

私は現在、これをやろうとしているが、これは、その結果「要求されたリソースにアクセスするための十分な権限」。私はadmin.initializeApp(functions.config()。firebase)でアプリケーションを初期化しました。 – tonsteri

関連する問題