# How to automatically populate given\_name and family\_name on user signup/login?

**URL:** <https://community.auth0.com/t/how-to-automatically-populate-given-name-and-family-name-on-user-signup-login/93513>\
**Category:** Get Help\
**Tags:** actions\
**Created:** [November 1, 2022, 5:00pm UTC](https://community.auth0.com/t/how-to-automatically-populate-given-name-and-family-name-on-user-signup-login/93513 "2022-11-01T17:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wandb-axel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/wandb-axel/32/33541_2.png) [@wandb-axel](https://community.auth0.com/u/wandb-axel)\
**Post date:** [November 1, 2022, 5:00pm UTC](https://community.auth0.com/t/how-to-automatically-populate-given-name-and-family-name-on-user-signup-login/93513/1 "2022-11-01T17:00:37Z")

</div>

Hello! We are using Auth0 as an IdP for SSO to Thinkific ([https://www.thinkific.com/](https://www.thinkific.com/)) using OpenID Connect. Thinkific requires the root attributes `given_name` and `family_name` to be set on the user.

We use the Universal Login Classic Experience. When the user logs in using Google, these attributes are properly set and it works just fine. However, when the user logs in using GitHub or email/password, these attributes are not set and the login fails.

Is there a way to ensure that these root attributes are always set for users when they sign up, even with dummy values (we don’t actually need their names)? I looked into using the pre-user-registration action trigger, but it seems that the API object there only allows editing `user_metadata` and `app_metadata`, but not root attributes like `given_name` and `family_name`.

I also found this page in the docs: [Set Root Attributes During User Signup](https://auth0.com/docs/manage-users/user-accounts/user-profiles/root-attributes/set-root-attributes-during-user-sign-up)  
However, it seems that this page covers the case when we are creating the user manually and not when Universal Login Classic (which seems to use Auth0 Lock under the hood) initiates the user creation for us. In a similar fashion, I could use the Management API to update the user post-signup, but apparently that specific trigger is non-blocking, so I’m worried that by that point Auth0 would have already sent the user data to Thinkific with the attributes still missing.

I am currently looking into 2 potential solutions to update the user after they sign up / log in, but before their data is sent to Thinkific, which I’m not sure will pan out:

- Using one of the blocking action triggers (maybe the post-login one?)
- Customizing the Auth0 Lock configuration in the Universal Login Classic page

I would greatly appreciate some pointers, even just confirming/denying whether or not I’m on the right track would be helpful.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [January 31, 2025, 9:46pm UTC](https://community.auth0.com/t/how-to-automatically-populate-given-name-and-family-name-on-user-signup-login/93513/2 "2025-01-31T21:46:14Z")

</div>

Hi @wandb-axel,

Welcome to the Auth0 Community and sorry for the late reply.

You should definitely be able to use a **post-login action** in your use case since this is triggered after a user is authenticated but before a token is issued. Since the user-metadata is only required to create the user’s account in Thinkific, you can use the `api.user.setUserMetadata` function and provide any value for the `given_name` and the `family_name`.

Additionally if those values would also have to be set up correctly, you can also use the **Forms** option provided by Auth0 that can request the user to enter their firstname and lastname even after a social connection is enabled and assign the specified fields to the user’s metadata, which will then have to be assigned to a post-login action as well. There are different predefined [templates](https://developer.auth0.com/resources/templates/forms?_gl=1*1vrofzs*_gcl_au*MTEzMjcyMTIxNS4xNzM0NTI1MDYz*_ga*MTk5NDI5MjUzNy4xNzM0NTI1MDYz*_ga_QKMSDV5369*MTczODM1NjU3MC4xMTguMS4xNzM4MzU4NzczLjU5LjAuMA..) that you can use and more information can be checked under this [documentation](https://auth0.com/docs/customize/forms).

Thank you for your post and I hope this helped,  
Remus

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 14, 2025, 9:46pm UTC](https://community.auth0.com/t/how-to-automatically-populate-given-name-and-family-name-on-user-signup-login/93513/4 "2025-02-14T21:46:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
