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

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?

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?

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