khanprog
02/15/2024, 8:49 AM{message: "Are you sending too many / too few formFields?"}
here is the setting on the backend
EmailPassword.init({
signUpFeature: {
formFields: [
{
id: 'name'
},
{
id: 'phone',
optional: true
},
{
id: 'userId',
optional: true
}
]
}
from the frontend I am calling it like this
const formFields = Object.keys(payload).map(item => ({id: item, value: payload[item]}))
try {
let response = await signUp({
formFields
})
do I need to setup the same thing on frontend as well when initialising supertokens?rp_st
02/15/2024, 8:52 AMrp_st
02/15/2024, 8:52 AMkhanprog
02/15/2024, 8:54 AM[
{
"id": "name",
"value": "My Pug"
},
{
"id": "email",
"value": "test@test.com"
},
{
"id": "password",
"value": "testing1234"
},
{
"id": "userId",
"value": "lakdsjf12j3l1k2j3"
}
]
rp_st
02/15/2024, 8:55 AMphone
. You can give it as an empty string if you don't haev the value. I know that it is marked as optional, but that just means that it can be an empty string. I know that this is not intuitive - it's an open issuerp_st
02/15/2024, 8:55 AMkhanprog
02/15/2024, 8:55 AMkhanprog
02/15/2024, 8:56 AMkhanprog
02/15/2024, 8:58 AMrp_st
02/15/2024, 9:22 AMkhanprog
02/16/2024, 5:12 AM