Join Discord
Powered by
For passwordless recipe, we only want to allow exi...
# support-questions-legacy
e
erichosick
07/13/2023, 2:37 PM
For passwordless recipe, we only want to allow existing email address to receive an OTP. We pre-loaded Supertokens with users by calling Passwordless.signInUp. For the email someone is generating an OTP for, we will look to see if that users exists (
https://supertokens.com/docs/passwordless/common-customizations/get-user-info#using-getuserbyemail
) and throw an error if they don't. However, we are not quite sure what function to override. Is it pre-post-email delivery (
https://supertokens.com/docs/passwordless/email-delivery/pre-post-email
) ? And can we create a general error from that function (
https://supertokens.com/docs/passwordless/advanced-customizations/apis-override/custom-response/general-error
) ? We would like the error to show up on the 'Enter email address' screen above the email entry box.
Previous
Next