CSFrequency / react-firebase-hooks

React Hooks for Firebase.
Apache License 2.0
3.55k stars 304 forks source link

[auth] add useVerifyBeforeUpdateEmail hook #275

Closed skratchdot closed 1 year ago

skratchdot commented 1 year ago

First off, thanks for this library (@chrisbianca and @CSFrequency)!

I have some code that is using useUpdateEmail(), but I recently learned about the verifyBeforeUpdateEmail function (which I would prefer to use instead of updateEmail).

I searched this repo, and did not see any feature requests or code related to verifyBeforeUpdateEmail so I went ahead and added it.

I didn't do any testing, but I followed all the useUpdateEmail/updateEmail code- everything is very similar.

Let me know if you would like any more info!

I also fixed 1 existing typo in the readme (addres->address).

chrisbianca commented 1 year ago

@skratchdot Thank you for the submission! It looks good, so I have merged it for testing my end, then will make sure it gets included in an upcoming release