# When do we create a User Profile in our customer database?

**URL:** <https://community.auth0.com/t/when-do-we-create-a-user-profile-in-our-customer-database/97732>\
**Category:** Get Help\
**Created:** [January 9, 2023, 2:09am UTC](https://community.auth0.com/t/when-do-we-create-a-user-profile-in-our-customer-database/97732 "2023-01-09T02:09:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![melvinomh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/melvinomh/32/42348_2.png) [@melvinomh](https://community.auth0.com/u/melvinomh)\
**Post date:** [January 9, 2023, 2:09am UTC](https://community.auth0.com/t/when-do-we-create-a-user-profile-in-our-customer-database/97732/1 "2023-01-09T02:09:45Z")

</div>

We are trying out the Authorization Flow(OAuth2) of auth0. Since all signup/login are handled by auth0. We observed that auth0 creates a new User whenever it does not match a user based on email which we use for passwordless for example.

My question is, in this flow, when do we create a record in our database linking the auth0 User Id to the data for the user in our app’s database? Let’s say for example, first time calling our API after authorization, the user requests for his profile and the profile data should already exist.

Any ideas?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 13, 2023, 3:15pm UTC](https://community.auth0.com/t/when-do-we-create-a-user-profile-in-our-customer-database/97732/4 "2023-01-13T15:15:03Z")

</div>

Hi @melvinomh,

Welcome to the Auth0 Community!

You can create the record in your database just-in-time, by adding the user info to your records (typically the user\_id/sub as the UUID) when a new user/token is seen by your API.

Does that make sense?

---

<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:** [March 28, 2023, 1:20pm UTC](https://community.auth0.com/t/when-do-we-create-a-user-profile-in-our-customer-database/97732/5 "2023-03-28T13:20:18Z")

</div>

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