I am trying to show a custom message for passwordless login, when a user enters an email that has been rejected as invalid from my preUserRegistration action. I am returning an error from this hook, but I can find no way to present that error to the user.
I have found many posts that suggest using:
languageDictionary = Object.assign(languageDictionary, {
"error": {
passwordless: {
// User enters incorrect code
invalid_user_password: 'That is not the code',
// User does not enter code (i.e. leaves field blank)
'bad.verification_code': 'No code provided',
// invalid phone number
'bad.phone_number': 'Please enter a valid phone number!!!'
}
}
})
or something similar, to catch âbad.emailâ errors but Iâm not quite sure what triggers this, or how I can force the hook/action to return this error?
at this time, I am only able to present the user with âWEâRE SORRY, SOMETHING WENT WRONGâ and no specifics, which is not helpful at all to users.
Can someone please help me to return meaningful errors to users when their login attempt fails in certain ways?
many thanks!