I’m creating a duplicate of this post here because the other has not had a response from Auth0 staff at all. Not sure why, maybe the feedback category is monitored less or that post is just in the wrong place?
The issue I have experienced is the post user registration action runs after a passwordless user login, even if it’s not the first time they’ve logged in. My post user registration action creates a record in a database with a field storing the ID of the Auth0 user profile. There is a unique constraint on the value of this field in the database. When I log in with a previously logged in user there is evidence that the post user registration action runs because Auth0 monitoring logs the “Failed Post User Registration Hook” event which occurs because the unique constraint of the ID was violated and the database responds to the action runner with an error. This behaviour seems in contrary to the documentation (emphasis mine):
The post-user-registration triggers runs after a user has been created for a Database or Passwordless connection.