AngularFire2 update and delete profile of other user

685 views Asked by At

I have angular2 app and I try to allow the admin to update profile of the others users.

But I don't know how to find the user to update or delete its data profile...

How can I do ?

1

There are 1 answers

0
mattrowsboats On

Without using the Admin SDK, you cannot manipulate any user account from inside an app. In order to use the Admin SDK you would have to initialize it from within the app, which would make your Admin token available in the browser, which is unwise.

So one way to do this would be to create a node app that you could run securely somewhere (not available to the public) that connects to your Firebase app and is able to manipulate users that way.

The only "user manipulation" that's possible from inside a Firebase app for any given user is updating their own information and the ability to create a new user.

It should be noted that the user authentication and any "user information" you may or may not store in your database are separate and unrelated unless maintained by you and your app.