On the client, Firebase UI Web then updates the profile of the user using a subsequent updateProfile method.
I cannot notice this from your web app because Firebase UI resorts to a "trick" to only fire the onAuthStateChanged of your FirebaseApp instance listener after the profile of the user has updated.
Technically: Firebase UI does the account creation and profile update in a separate Firebase App instance, then, when the user is fully ready it signs-the user in your original FirebaseApp instance.
However, on Cloud Function, the trigger will get called right after the createUserWithEmailAndPassword call, before the profile is updated.
Objective Create a page where users can update their profile picture and select the display name.
When the user account created through email and password, there's no way to get user's
displayName
to populate into a database.It is very dangerous to maintain the following code below because it does not work consistently.
See the API doc createUserWithEmailAndPassword.
On the client, Firebase UI Web then updates the profile of the user using a subsequent updateProfile method. I cannot notice this from your web app because Firebase UI resorts to a "trick" to only fire the onAuthStateChanged of your FirebaseApp instance listener after the profile of the user has updated.
However, on Cloud Function, the trigger will get called right after the
createUserWithEmailAndPassword
call, before the profile is updated.