On Auth0 Lock v11.4.10 I’m experiencing the same issue as discussed in this thread: Auth0 Lock singup name field - #2 by shayan.memari.
With username / password I’m seeing the “email” field populating the “name” field for newly created accounts on manage.auth0.com. The thread recommended that if “user_metadata.name” was provided it would override this and correctly set the name field. I used additionalSignUpFields to add a new “name” field to my signup form and I’m still seeing the “email” field populating the “name” field.
additionalSignUpFields: [
{
name: 'name',
placeholder: 'your full name',
icon: `data:image/png;base64,${blank}`,
validator: (name: string) => {
return {
valid: name.length >= 2,
hint: 'Please enter your full name',
};
},
}
]
Here is an example of the RAW JSON that auth0 is sending on signup. Notice both “name” and “user_metadata.name”
{
"created_at": "2020-04-06T20:11:12.202Z",
"email": "emailtest+4@gmail.com",
"email_verified": false,
"identities": [
{
"user_id": "5e8b8ce0e52f910cdb5a2cae",
"provider": "auth0",
"connection": "Username-Password-Authentication",
"isSocial": false
}
],
"name": "emailtest+4@gmail.com",
"nickname": "emailtest+4",
"picture": "https://s.gravatar.com/avatar/a13a0dc88f263774b119e4ffcc4286c0?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fem.png",
"updated_at": "2020-04-06T20:11:12.439Z",
"user_id": "auth0|5e8b8ce0e52f910cdb5a2cae",
"user_metadata": {
"name": "Test Here",
"company": "slkdjflsjf",
"title": "lkjsldfs"
},
"last_ip": "73.93.244.157",
"last_login": "2020-04-06T20:11:12.437Z",
"logins_count": 1,
"blocked_for": [],
"guardian_authenticators": []
}
Any help or guidance is greatly appreciated.