Learning Stuff
Learning Stuff

Reputation: 13

Get Firebase user data using email address

Could I know how to get User data by Email registered to Firebase Auth?

Because I'm using Firebase auth to create users by createUserWithEmailAndPassword in the system from backend. In that method, I'm avoiding password encryption.

And In the future, If I need to update a user password from the backend I want user data. And I don't save uid in my MongoDB for security reasons.

I read so many articles that say use getUserByEmail I think this is deprecated.

How can I do this? Need help :)

Upvotes: 0

Views: 384

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317372

The documentation doesn't say anything about getUserByEmail being deprecated. It literally says:

In some cases you will have a user's email instead of their uid. The Firebase Admin SDK supports looking up user information with an email:

So, you should just use what the documentation says.

Upvotes: 1

Related Questions