We are adding phone number sign in only to our app, we have noticed some formatting differences between what is stored in supertokens verse what gets passed in by
createCodePOST
override function.
We can see in the dashboard a phone number saved as +640223334444 on a user. Which is set by
updateUser
.
The issue is when we post a phone number to
/auth/signinup/code
(+640223334444) the phone number provided from the createCodePOST argument input is +64223334444 (missing the zero after the country code). We are using this input phone number to search to see if any users have the phone number attached to their user, if so let them sign in, else require them to sign up via email.
Because the input has the 0 stripped off, the listUsersByAccountInfo is retuning no users.
Is the stripping of the 0 in the createCodePOST intentionally or a bug? If intentional, how come the
updateUser
doesn't format the phoneNumber the same?
Thanks
r
rp_st
11/15/2023, 5:58 AM
hey @__jono thanks for reporting this. It's indeed a bug. We will fix it right away.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).