Why is it that when users log in using an email and password, their first and last names do not properly enter in the first and last name fields in the Auth0 database? This data (first and last name) only shows in metadata, and their email is re-entered as their name.
This makes searching for users really hard. And considering that curating the login functionality is a core utility, this seems like a big thing to not work properly. And note if they log in with Google, the first and last name correctly show in the correct fields.
That is by design. You can workaround this by asking the user to submit their first and last name during the sign up process. See this knowledge solution for more information.
Hey Reuben. This is how our additional fields are set up.
additionalSignUpFields: [
{
name: “given_name”,
placeholder: “Enter your name”,
validator: function(givenName) {
return {
valid: givenName.length > 0,
hint: “Your first name is required”
};
}
},
{
name: “family_name”,
placeholder: “Enter your surname”,
validator: function(familyName) {
return {
valid: familyName.length > 0,
hint: “Your last name is required”
};
}
}
]
Though when I add storage: ‘root’, the metadata no longer show. So, givenName and familyName no longer are recognised in metadata. All we need is that givenName and familyName are shown on the table when user’s sign up with email and password, just like it is when the sign up with social so then we can easily search them by name.