Hey guys, I'm trying to implement PhoneNumber-Pass...
# support-questions-legacy
e
Hey guys, I'm trying to implement PhoneNumber-Password recipe in Python Django framework and I'm stuck with overriding the reset password logic
r
hey @execreate
e
Copy code
python
from supertokens_python.recipe.passwordless.utils import default_validate_phone_number

...
recipe_list=[
    emailpassword.init(
        sign_up_feature=emailpassword.InputSignUpFeature(
            form_fields=[
                emailpassword.InputFormField(id='email', validate=default_validate_phone_number)
            ]
        ),
        email_delivery=emailpassword.EmailDeliveryConfig(
            override=SOMETHING GOES HERE
        ),
    ),
...
r
right. And whats your question?
e
I'm not sure how do I override the
send_email
function in
email_delivery
there
Copy code
python
def sms_email_delivery_override_functions(original_implementation: EmailDeliveryInterface):
    async def send_email(input_data, user_context):
        # do something here?

    original_implementation.send_email = send_email
    return original_implementation
should I do something like this?
r
Yea.. you should actually send email an SMS here since the input_data has the phone number
e
I'm just not sure about the signature of the send_email function. The JS example on https://supertokens.com/docs/phonepassword/backend/email-password-customisation says that I have to check
input.type === "PASSWORD_RESET"
, but I guess in python version it must be a bit different?
e
Oh cool, that's what I wanted
Thank you @rp_st !