Webhook events for multi part forms
-
Hi there! At work, we're in the process of evaluating FusionAuth to replace our current auth system and I'm building a proof of concept to see how feasible this is.
In our apps, we have a multi-step onboarding process; in one of the steps, the users are required to enter a code sent via SMS to the phone number they inputted in the previous step. Reading the docs, I see that the multi-step form can be implemented with the advanced forms feature; but now I'm thinking about how could I signal our API to send the verification code to the user, is there a way to implement a webhook that fires after each step in the form is completed? Or does it only fire after all the steps are completed? I see that there is the 'Registration update' webhook; could that one work?
Thanks in advance!
-
Hi @alessandrojcm,
Unfortunately, if you are using advanced registration forms, this is not currently a possibility. If you would like, you could submit a feature request for our development team to review, outlining your use case.
Based on a read through the tech guide below, it would appear if you use the Forms API, you could write custom code to call a webhook via our webhook API as you are iterating through an API-created form. This would, of course, negate some of the saved dev work in using advanced registration forms, but may be an option, depending on how you implement it.
Is the code that you are sending related to MFA? Or some other business logic? If MFA related, there may be more options that we can explore.
I hope this helps!
Thanks,
Josh
Related documentation
Registration Forms
Webhooks API
-
Hi @joshua , thanks for your response.
Is the code that you are sending related to MFA? Or some other business logic? If MFA related, there may be more options that we can explore.
My use-case is related to our business logic, our app is only available in certain countries; thus we require users to validate they're in one of those countries via a code sent to their phones. I've read the docs about the Form API but I don't quite see how would it solve this issue (and, as you said, would negate the benefits of advanced forms). The other option would be just to validate the phone outside FusionAuth (like we're doing right now), but I would like to migrate all the registration-related steps into FusionAuth.