For some reason, as of a couple of days ago, our post registration hook seems to be firing twice, sending duplicate user info to our CRM.
What could be causing this?
For some reason, as of a couple of days ago, our post registration hook seems to be firing twice, sending duplicate user info to our CRM.
What could be causing this?
Hi @javajiver,
Thanks for reaching out to the Auth0 Community!
I understand you have been observing your Post Registration Hook firing twice recently.
After testing this myself, I could not replicate the same observations. Instead, my Post User Registration Hook fires only once per sign up flow.
In this case, could you please try using the Realtime Webtask Logs extension to troubleshoot and see if you can isolate the Hook script that may be contributing to firing twice.
Alternatively, could you please try using an Auth0 Post User Registration Action to see if it addresses the issue?
Please let me know how this works.
I am looking forward to hearing from you.
Thank you.
Thanks for checking. While the test itself doesn’t fire twice within the editor, the actual live process does. Time stamps are exact 2 times in a row for each user that signs up. This changed a few days ago without any code adjustments…
Hi @javajiver,
Thank you for your response.
I have completed the tests in a browser sign-up flow and did not observe the Post Registration Hook firing twice. I also included console.log() statements to verify that I only see one execution on the Realtime Webtask Logs. For example:
module.exports = function (user, context, cb) {
console.log('--start hook--');
// code redacted for brevity
console.log('--end hook--')
cb();
};
In this situation, could you please capture a HAR file of the sign-up flow for me to look into this further?
Thank you.
I created a action to perform the same process and once again, that action runs twice when it’s in use - but only once during testing…
I will run your hook inline also to track it. During testing, I do confirm it fires only once.
I can’t get a HAR file as it’s a mobile app… I do know a few days ago there was an update to our app… not sure if that would be causing it.
Here is what I see in the log
Hi @javajiver,
Thank you for your responses.
In this scenario, could you please send me your Tenant name in a direct message?
I suspect that there may be something in the settings causing the hook to fire twice, but I am not sure.
I am looking forward to hearing from you.
Thank you.
I sent the info a couple of days ago. it doesn’t matter if it’s a hook, rule or flow - it triggers twice.
I do see about 1 per day of a single trigger instead - but haven’t been able to dig down as to why one would be different.
Currently, we have it setup as an action
Quick question. This flow goes to Zapier, in which that rule has two triggers in it. Would that be causing the log to show each trigger twice?
Hi @javajiver,
Thank you for providing the information in DMs.
After investigating your tenant settings, specifically looking at your Rules and Hooks, I found that you have disabled all of them.
Given that, could you confirm if you are still experiencing this issue?
Moreover, digging into each Rule/Hook, I did not find anything that indicates why you have observed double executions. The flow going to Zapier through making an API call should not trigger the Rule twice.
One suggestion that may be worth considering to troubleshoot this issue is to individually enable each Rule and see if you can isolate the script that is causing issues.
Alternatively, you could create a new generic Rule and see how that behaves when a user authenticates. In essence, we should expect one execution.
Please let me know how this goes.
Thank you.
We have a custom action active on the post registration.
I went ahead and added a test hook on it to see if that triggers twice.
Hi @javajiver,
Thank you for your response.
Please let me clarify that if you are using an Auth0 Post-User Registration Action, you should add a test in the same or in a new Action script to verify the execution count.
You will not need to include a test in a Post-User Registration Hook.
Please let me know your findings after your tests.
Thank you.
I did utilize a test hook and it fired twice
Hey there!
As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.