hi! i need help with implementing my country's OTP...
# support-questions
y
hi! i need help with implementing my country's OTP service phone sign-in. im having a hard time figuring out which part i should override to integrate with my country's OTP service
r
Hey! You can provide the
sendSMS
override function to do this: https://supertokens.com/docs/thirdpartypasswordless/sms-delivery/custom-method
(i assume that you are using thirdpartypasswordless recipe
y
thanks for quick response i am using just Passwordless recipe
r
y
and i'm trying to implement phone + password recipe (i think it's new, i haven't seen it before)
thanks, i'll take a look
r
Yea. That is new, but the phone + password recipe requires a fair bit of customisation.. so feel free to ask questions here.
y
i thought that it should override
EMAIL_VERIFICATION
in
emailDelivery
because in the guide there is override for
PASSWORD_RESET
https://supertokens.com/docs/phonepassword/backend/email-password-customisation#change-reset-password-logic
r
This is for the phone number + password login or passwordless login? Im confused.
y
waaaait, should i have followed only 1 option? EmailPassword | Session | Passwordless ?
r
yea i mean really depends on what login you want. Do you just want phone number + OTP login?
Or something else?
y
i want to have phone+password, and to have users to verify their phone numbers via OTP sms
r
got it.
So for the send SMS part, you would need to override the sendSms function in the passwordless.init function
as shown in the link i had sent.
y
😅 how can i clear users database?
r
for the managed service?
or self hosted?
y
self hosted via docker compose
r
Right, you can truncate all the tables in your db, and then restart the core.
y
Passwordless sendSms isn't called ever my supertokens.init looks basically the same as this https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-phone-password/api-server/index.ts
r
Can you enable debug logs and show the output of that?
And also how have you added the sendSms callback?
y
sorry, i was on a lunch break i think the problem was with nextjs' cache 😅 everything works, now i gotta deal with my sms service provider 😵 thanks lot
r
ah right! We do have an SMS sending service which you can use if you like.