# Used Auth0 to Seperate User Data from each others

**URL:** <https://community.auth0.com/t/used-auth0-to-seperate-user-data-from-each-others/109828>\
**Category:** Get Help\
**Tags:** identifier-first, login-experience\
**Created:** [June 23, 2023, 5:04am UTC](https://community.auth0.com/t/used-auth0-to-seperate-user-data-from-each-others/109828 "2023-06-23T05:04:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![longta3110](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/longta3110/32/48263_2.png) [@longta3110](https://community.auth0.com/u/longta3110)\
**Post date:** [June 23, 2023, 5:04am UTC](https://community.auth0.com/t/used-auth0-to-seperate-user-data-from-each-others/109828/1 "2023-06-23T05:04:25Z")

</div>

Can anyone give me an idea on how could I separated my user data from each other by Auth0. I am currently working on a todoapp project and I don’t have any idea on how to create a separate database(or table?) each time a new user create their account through Auth0.  
I greatly appreciate help

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [June 26, 2023, 5:40pm UTC](https://community.auth0.com/t/used-auth0-to-seperate-user-data-from-each-others/109828/3 "2023-06-26T17:40:23Z")

</div>

Hey there @longta3110 welcome to the community!

> [@longta3110](#):
>
> I am currently working on a todoapp project and I don’t have any idea on how to create a separate database(or table?)

If I’m understanding your question correctly, I think your best bet is to use a [Post User Registration Action](https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow) to make a call to your own API/Database in order to create the newly registered user - It might look something like this for example:

```auto
exports.onExecutePostUserRegistration = async (event, api) => {
  const axios = require('axios');

  try {
    const response = await axios.post('https://my-api.com/users', {
      auth0_id: event.user.user_id,
      email: event.user.email
    });

    console.log(response);
  } catch (error) {
    console.log(error);
    // handle your error as needed
  }
};

```

Hope this helps!

---

<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:** [July 10, 2023, 5:40pm UTC](https://community.auth0.com/t/used-auth0-to-seperate-user-data-from-each-others/109828/4 "2023-07-10T17:40:30Z")

</div>

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