CSFrequency / react-firebase-hooks

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

Suggestion for updating user In useAuthState #229

Closed n1ght-hunter closed 1 year ago

n1ght-hunter commented 2 years ago

I've just been using your package for Auth hooks and noticed that it has no support for update of the current user i.e. when you change email or display name the state isn't updated.

i have gone an written my own simpler way of handling Firebase Auth. but thought since you already have your own hooks for updating email, display name etc it might be worth putting in a callback that runs when ever those hooks are run that updates useAuthState user to auth.currentUser.

chrisbianca commented 1 year ago

Thanks @Night-Hunter-NF, this has been requested previously but I've not had a chance to tackle it yet: https://github.com/CSFrequency/react-firebase-hooks/issues/147

I'm going to close this in favour of that issue.