Auth lock - Sending custom parameter on password reset link

Hello all!!

We’re implementing the signup and password reset on our company by using auth lock since we are not able to use the universal login solution in our case. We already implemented the signup flow correctly, but are having problems with the reset password functionality due to not being able to pass a custom parameter into the auth0 reset password flow.

Our initial idea was be to use something similar to the “additionalSignUpFields” that exists for the signup flow, but since there is not this possibility for the reset password we are trying for other solutions:

1.- We were trying to make some trick on JS to pass our custom field when clicking on the submit button, by trying to append the value to the “email” input field (by adding something like &param=paramValue to the end of the email). We are not having much luck with this, because somehow the value is not getting appended on the API call to change_password. Our idea with this was to after retrieve this value in the GetUser custom database link to implement our flow (we need to call a legacy API to do the actual reset password).

2- This is the solution we actually have in place for now, which is to use the lock.on(“forgot_password submit”) event to launch our own API call to our legacy reset password (this is the one we want to use). This works, but it does not prevent the “change_password” call that locks makes by default to the auth0 API when submitting the form, the problem we see with this approach is that we will be doing an extra call that we dont really need to auth0.

I don’t know if anybody would happen to have a solution for this scenario, but if somebody got a trick to do it we would be very grateful for it.

We know of the existente of the “forgotPasswordLink” param on lock, but we cannot afford making a redirect from the widget, this is why we are trying to go with the 2 options mentioned above.

Thanks in advance for reading.

Sergio.-