# Implementing User Creation on First Login with Auth0 and Flask

**URL:** <https://community.auth0.com/t/implementing-user-creation-on-first-login-with-auth0-and-flask/139094>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [July 17, 2024, 3:05am UTC](https://community.auth0.com/t/implementing-user-creation-on-first-login-with-auth0-and-flask/139094 "2024-07-17T03:05:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodyli123](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rodyli123](https://community.auth0.com/u/rodyli123)\
**Post date:** [July 17, 2024, 3:05am UTC](https://community.auth0.com/t/implementing-user-creation-on-first-login-with-auth0-and-flask/139094/1 "2024-07-17T03:05:07Z")

</div>

I had created a project using auth0 that uses react for the frontend with vite and flask for the backend. Currently I am making a call to my api everytime a user logs in checking if a user model is created in my db. If the user id doesn’t exist, I create a user otherwise nothing. But I was wondering if there was a way to somehow create a user once on first login/registration ever. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 17, 2024, 3:05pm UTC](https://community.auth0.com/t/implementing-user-creation-on-first-login-with-auth0-and-flask/139094/3 "2024-07-17T15:05:22Z")

</div>

Hi @rodyli123

Welcome to the Auth0 Community!

Thank you for posting your question. If I understand correctly, you have an external database that creates a user model after users register for your application. If you are relying only on email+password connection type, you can use Post User Registration Flow to pass user data to your external database → [Post User Registration Flow](https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow#store-the-auth0-user-id-in-a-remote-system).

If, in your flow, you utilize the social connection, you can distinguish the first login with post login action → [How to distinguish first login after sign up - #3 by supergrounded](https://community.auth0.com/t/how-to-distinguish-first-login-after-sign-up/94885/3)

I hope this will help you!  
Dawid

---

<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 31, 2024, 3:05pm UTC](https://community.auth0.com/t/implementing-user-creation-on-first-login-with-auth0-and-flask/139094/4 "2024-07-31T15:05:32Z")

</div>

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