How to save user_id in to my database?


I am implementing an app which user can log in and create profile page. Im using Auth0 React front end to do authentication. After user successfully signs up, i want to save user_id into my database. I look through the documentation and see there is post user registration hook which is potentially useful to trigger a request to my server and save user_id. But i wonder if there is failure either on Auth0 or on my side, then user is created but no user_id saved on my side.

Is there any suggestion how to approach this problem?

Hi @minh.d.nguyen2211,

Welcome to the Community!

If there is a failure the hook can retry.

Alternatively, when your backend can’t find a userID in the database, it could create a new user with the ID from the token.

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