Closed jimcru21 closed 11 months ago
Hi @jimcru21
Can you post the code you are using?
Are you generating your own OTPs as well?
Are you generating your own OTPs as well?
No. Im just customize the SMS. I Dont want to use built in and twillio
Hi @jimcru21
Can you post the code you are using?
This some Code snippet
*originalImplementation.SendSms = func(input smsdelivery.SmsType, userContext supertokens.UserContext) error {
// amount of time the code is alive for (in MS)
codeLifetime := input.PasswordlessLogin.CodeLifetime
phoneNumber := input.PasswordlessLogin.PhoneNumber
// OTP
userInputCode := input.PasswordlessLogin.UserInputCode
fmt.Println(codeLifetime)
fmt.Println(phoneNumber)
fmt.Println(userInputCode, "user Code")
// TODO: Create And Send OTP
return nil
}
Hi @jimcru21 input.PasswordlessLogin.UserInputCode
is a pointer. To get the string value of it you should use *input.PasswordlessLogin.UserInputCode
Closing this issue for now, feel free to re-open it if the issue persists
Im using other SMS Otp Provider
After overriding the default smsdelivery, the input.PasswordlessLogin.UserInputCode giver random hex decimal code ( ex: 0x14000546150 ) instead of 6 digit code.