der_suchende
04/09/2023, 10:12 AMrp_st
04/09/2023, 10:15 AMsendSms
function to log the OTP code to the console.
Here is the docs link snippet for how you can use sendSMS: https://supertokens.com/docs/passwordless/sms-delivery/custom-methodder_suchende
04/09/2023, 12:24 PMder_suchende
04/11/2023, 12:08 PMder_suchende
04/11/2023, 12:09 PMPasswordless.init({
contactMethod: "PHONE",
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK",
smsDelivery: {
override: (originalImplementation) => {
return {
...originalImplementation,
sendSms: async function ({
codeLifetime, // amount of time the code is alive for (in MS)
phoneNumber,
urlWithLinkCode, // magic link
userInputCode, // OTP
}) {
console.log(userInputCode);
}
}
}
},
}),
der_suchende
04/11/2023, 12:09 PMrp_st
04/11/2023, 12:17 PMder_suchende
04/11/2023, 12:40 PMrp_st
04/11/2023, 12:40 PMder_suchende
04/11/2023, 12:41 PM