derSuchende
04/09/2023, 10:12 AMrp
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-methodderSuchende
04/09/2023, 12:24 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);
}
}
}
},
}),
rp
04/11/2023, 12:17 PMderSuchende
04/11/2023, 12:40 PMrp
04/11/2023, 12:40 PMderSuchende
04/11/2023, 12:41 PM