Custom Field code

@bwprado This time I used the other code you sent but it didn’t work. It gave an error on options saying "A rgument of type ‘{ contactInfo: { coins: number; }; }’ is not assignable to parameter of type ‘RegistrationOptions’. Types of property ‘contactInfo’ are incompatible. Type ‘{ coins: number; }’ has no properties in common with type ‘ContactInfo’.

import { authentication } from 'wix-members'

$w.onReady(() => {
  $w('#button1').onClick(async () => {
    let email = $w('#input1').value
    let password = $w('#input2').value
    let coins = Number($w('#input3').value)
    //Create Options Object with contact info and custom fields
    let options = {
      contactInfo: {
        coins,
      },
    }

    try {
      const registrationResult = await authentication.register(
        email,
        password,
        options //it gave an error here
      )
      console.log(registrationResult)
    } catch (error) {
      console.error(error)
    }
  })
})