supertokens-auth-react icon indicating copy to clipboard operation
supertokens-auth-react copied to clipboard

Allow users to normalise form field inputs

Open rishabhpoddar opened this issue 3 years ago • 0 comments

  • They should be able to give their own logic for normalising this on the frontend and backend SDKs - similar to how they can give their own logic for validating these.
  • Also in passwordless recipe, in case of phone number and email input, we call the defaultEmailValidator first and then call the user's phone number / email validators. This works fine in 99% of the cases since our default validator is very basic, but what if the user wants to not input emails at all in this case and wants to do phone number or username?
  • Should we do trim to all fields in the form field other than password ones? Cause doing the trimming just for the validation check is odd since it leaves the actual email / phone number in the network request non trimmed.

rishabhpoddar avatar Sep 18 '22 15:09 rishabhpoddar