Hi! I want to enforce email verification before signup. I have used a rule as suggested here.
However, it’s unclear how to tell the user in the Universal Login window that they need to verify their email before logging in. I also cannot get the Universal login to show a flash error if the user is not verified.
Here’s the code I added to the login customization script in my dashboard:
lock.on("authorization_error", function(error) {
lock.show({
loginAfterSignUp: false,
flashMessage:{
type: 'error',
text: error.error_description
}
});
})
This does not fire; it only redirects the user to the login screen again without an error. I want to keep the user in the UI window rather than redirecting to a page in my application. How can I accomplish this?