I would like to inform the user about the specific issue with this migration of this account when login and password are valid.
I can do that by showing the right message but I would like also to do a few additional operations in JS.
var lock = new Auth0Lock([...]);
lock.on("authorization_error", function(error) {
/// [...] code to control behaviour of the page
});
// below code will not work beacuse it doesn't recognise `custom_validation_error_code` as an event.
lock.on("custom_validation_error_code", function(error){
/// [...] code to control behaviour of the page
});
Unfortunately, Lock doesn’t provide the possibility to react to such a event. Is there any possibility react in javascript on a custom validation error?
Hey there @robert.firek, when it comes to Lock we do have the ability to customize Lock error messages as described in the below doc. However I could be totally missing the base here and you have a different question all together. Please let me know if this helps you in your quest at all. Thanks!
I can customise messages but I don’t have the ability to execute javascript in the reaction to this event:
// below code will not work because it doesn't recognise `custom_validation_error_code` as an event.
lock.on("custom_validation_error_code", function(error){
/// [...] code to control behaviour of the page
});
I checked with one of our senior support engineers and I was able to confirm that it’s not possible with Lock. However this should be possible when working with the hosted login page with Auth0.js a full custom implementation. Sadly we don’t have any examples of this implementation use case. I hope this helps provide some insight @robert.firek, thanks!