1

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 ?

Swarovski
  • 581
  • 2
  • 8
  • 25
  • Did you find a solution? I am trying to do the same. http://stackoverflow.com/questions/42557686/angularfire2-delete-user-for-a-uid – Richard Mar 02 '17 at 14:18
  • @Richard Maybe you can use https://firebase.google.com/docs/auth/admin/manage-users . But I don't know how to run it, I always get multiple errors like "module doesn't exist" ... Because of my bad english I maybe miss some important part of the doc. Let me know if you find a solution. – Swarovski Mar 06 '17 at 22:25

1 Answers1

0

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.

mattrowsboats
  • 582
  • 1
  • 6
  • 14