I am developing an application using Vue.js (+Universal Login Auth0), Node.js, and a specific database. My goal is to integrate users created in Auth0 with my database, ensuring synchronization of information. In case of errors during user creation in Auth0 or in my own database, I want to execute a rollback to prevent data desynchronization between the two databases.
I would like to know if there are recommended best practices for this implementation or if there is a step-by-step guide that I can follow.
Sync on login via Login Flow Actions (be careful, this runs on every authentication and requests can slow down your login flow)
Or sync with your DB when you receive a valid token in your app.
Alternatively, you can use your DB as the source of truth with Custom Database Connections, but this will limit you to only username/password connection and no third party IdPs like Google or Github.
Thank you for the reply , Now i am going to use postlogin action ,
So i want user orgnizationId for store into my db i have an one api to create user ,
But i need userId , email and organizationId .
I get userId and email using event but I don’t know how to get organizationId ?