Is there a way to ensure a hook runs successfully and keep on retrying? We are trying to sync Auth0 DB users to our legacy DB as we are integrating Auth0 and we want our pre existing features to be back ward compatible with when a user is created through Auth0 vs our legacy system.
So my thought is to send the authenthication event results from two ways:
Through client from using Lock on event “on authentication” to our own endpoint
Have Auth0 handle it through hooks
I don’t know a good way for us to approach this on ensuring that the database is synced at all times. Any suggestions?
As hooks run in a sequence from top to down and there is not any way to re run hook in same cycle. What i suggest to you is that you write your logic in hook in some kind of loop to retry when your required condition doesn’t meet or you can write two hooks to give another try to sync your DB.
@rashid779939 - are we able to just rollback the created user in the post registration - if so can you provide a quick code snippet on how to achieve that in the hook?
Touching base on this topic @mdere and I wanted to find out if you are still running into a challenge with this? Also are you accounting for rate limiting with your implementation? I would love to find out more about the situation and how I can be of service. Thanks!