Python logix
Python logix

Reputation: 359

How to change firebase password from admin section

I want to change user password form admin. Users are login with firebase email and password option. Admin is also login with firebase. How can change the user password with web api?

Upvotes: 0

Views: 486

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 600006

There is no way to change another user's password with the client SDK.

Firebase Authentication doesn't have any concept of an admin user. That means that it can't grant special privileges to a user that you consider an admin.

There is however an Admin SDK, that runs with administrative privileges, and has the option to change the password (and other profile data) of any user in the project. This SDK is meant to be used on a so-called trusted environment, such as your development machine, a server you control, or Cloud Functions.

You could wrap the Admin SDK in an API endpoint that you can call from your web client code. Just be sure to check in the custom function whether the user is authorized to change the password.

Upvotes: 1

Related Questions