I'm using Firebase in my iOS app. The user logs in using Firebase's email and password authentication. Currently, I'm creating functionality that lets the user change their email and password.
I noticed that after successfully changing the e-mail address using changingEmailForUser, the e-mail address in authData.providerData isn't updated. To update it, the user has to log out and log in again (using the new email address).
Is this expected behavior? Can I update the email in the providerData dictionary manually (or is that a bad idea?) or is it possible to force a refresh of the providerData for the logged in user?
This is indeed expected behavior. The existing session is "bound" to the old email address. To get a session for the new email address, the user will have to sign in again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With