firebase create user by email not returning displayName using ui 2.3.0
See original GitHub issueseeing this issue closed several times in here, I am little shocked I have to post this issue.
using a simple firebase function, and using code very similar to the example here: https://firebase.google.com/docs/reference/functions/functions.auth.UserBuilder#onCreate
and using the sign in by email method on the firebase ui, and having the user sign up with first and last name,
my firebase function:
exports.createAccount = functions.auth.user().onCreate(function(event) {
const data = event.data;
console.log(data);
});
and the firebase function log shows me:
{ email: 'yoda@example.com',
metadata:
{ createdAt: 2017-07-28T14:29:08.000Z,
lastSignedInAt: 2017-07-28T14:29:08.000Z },
uid: 'xxxxxxxxxxx' }
where is yoda’s displayName (should be: Yoda Yo) which he entered in firebase ui?
And, so if I used the entire example in the link I posted above, how am I supposed to send yoda a personalized sign up email using his first name, when firebase ui doesn’t even return it?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Manage Users in Firebase - Google
You create a new user in your Firebase project by calling the createUserWithEmailAndPassword method or by signing in a user for the first...
Read more >User displayName returns null in Firebase Auth - Stack Overflow
Turns out that fetching displayName during UserCredential registration still gets null. Try fetching displayName using currentUser . I've tried ...
Read more >Update Username and Scrollfix - Firebase Profile - Part III
Today we want to update the username inside of our # Firebase #Profile. Besides that, we fix a Pixel Overflow problem whenever we...
Read more >User management - Firebase Admin SDK for PHP
The uid to assign to the newly created user. Must be a string between 1 and 128 characters long, inclusive. If not provided,...
Read more >Chapter 19 Firebase | Client-Side Web Development
It's possible to have users sign up with an email and password, ... Make sure you're creating the Realtime Database, not the Firestore...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a functional setup using a delay, but it does create a race condition. It seems a nicer solution would be to add an onUpdate trigger on the UserBuilder object (maybe this is already on a todo list somewhere?).
functions.auth.user().onUpdate(...)
okay then. thanks for this new info.
how about somewhere, the firebase team mention in ui or user creation documentation that email sign up does not act as expected or the same as other provider sign up. or fix it so they all work the same, ie don’t return a user until all profile info like displayName is ready.
in the meantime - any suggestion HOW to actually get the user displayName upon creation from email sign up using ui?
Update: nevermind, able to pull user info with a promise after email signup:
functions console shows displayName: