firebase - Creating Users in AngularFire without Signing In -
im making app in angularjs
, app has scenario user admin role can create users.
i know can create users using
$createuserwithemailandpassword("my@email.com", "mypassword")
sign outs current user
.
i want create users,not let them sign in after registering.
i found can use firebase admin sdk
it. unable initialize in controller gives error require not defined
var admin = require("firebase-admin"); admin.initializeapp({ serviceaccount: "/myservice.json", databaseurl: "urldb" });
i responded comment on previous answer:
the firebase admin node.js sdk should run in trusted environment only. creating user without signing them in considered administrative task.
you should not use firebase admin sdk add functionality same app give regular users. security concern.
Comments
Post a Comment