Rolling back a signup

I was wondering if there is some way to wrap a signup in a transaction, as it were. For example, our signup process takes 2 steps. When a user clicks submit on our signup form we…

  1. We send a request to Auth0 to sign the user up
  2. We take the Auth0 id from the previous step and send a request to our API to do other sign up stuff.

If step 2 fails, I don’t want the user to be created in our Auth0 database. So, how I can I rollback a signup if part of the sign up process fails? Is deleting the user the only option?

Hi @nick.gieschen,

Would you mind providing more info on how you have implemented step 2? If you are using a post-login Action or Rule, then the user would not be allowed access to the app, although the user would be created.

I don’t believe there is a way to add a user in something like a DB transaction, but there is a delete user endpoint that you could probably use if step 2 fails ( DELETE/api/v2/users/{id}