Hello @Erica,
Welcome to the Community!
The first thing to note is that this is based mainly on “database” users. Enterprise login and social login will be a bit different.
Also not that you can change these fields after the user is signed up. So if you want to keep registration simple, you can leave these out up front, and have the user fill in the details later.
That said, the only way to prevent this behaviour is to provide the data up front. Root level fields like nickname
are standard OpenID Connect claims and I suspect Auth0 is trying to fill those in as best it can based on the data it has at hand. E.g., if I create a user using:
{
"app_metadata": {},
"connection": "Username-Password-Authentication",
"email": "shepard@sr2.ca",
"password": "${A_PASSWORD}",
"user_metadata": {}
}
The resulting using user has a nickname, even though I did not specify one:
{
"created_at": "2020-12-14T20:54:08.888Z",
"email": "shepard@sr2.ca",
"email_verified": false,
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "5fd7d0f091a780006f20c283",
"provider": "auth0",
"isSocial": false
}
],
"name": "shepard@sr2.ca",
"nickname": "shepard",
"picture": "https://s.gravatar.com/avatar/328ed7181b0dcfdf2b114080c20ed6fe?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsh.png",
"updated_at": "2020-12-14T20:54:08.888Z",
"user_id": "auth0|5fd7d0f091a780006f20c283",
"user_metadata": {},
"blocked_for": [],
"guardian_authenticators": []
}
So one solution is to provide the details when the user is created:
{
"app_metadata": {},
"connection": "Username-Password-Authentication",
"email": "liara@sr2.ca",
"family_name": "T'Soni",
"given_name": "Liara",
"name": "Liara T'Soni",
"nickname": "Liara",
"password": "${ANOTHER_PASSWORD}",
"user_id": "ee90811f-9f95-44f4-9b92-8a2dcb9b5bed",
"user_metadata": {}
}
Resulting in:
{
"created_at": "2020-12-14T20:54:30.585Z",
"email": "liara@sr2.ca",
"email_verified": false,
"family_name": "T'Soni",
"given_name": "Liara",
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "ee90811f-9f95-44f4-9b92-8a2dcb9b5bed",
"provider": "auth0",
"isSocial": false
}
],
"name": "Liara T'Soni",
"nickname": "Liara",
"picture": "https://s.gravatar.com/avatar/cb8f7e1bd1a0e014808fea2a5ee7d704?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Flt.png",
"updated_at": "2020-12-14T20:54:30.585Z",
"user_id": "auth0|ee90811f-9f95-44f4-9b92-8a2dcb9b5bed",
"user_metadata": {},
"blocked_for": [],
"guardian_authenticators": []
}