Phone & Email SignUp

Hello, I am writing a user registration function using the supabase auth function. In this function, I send the user email, phone and other information together. (other information is included in raw_user_meta_data) However, the phone number is not recorded in the request I send via Postman. How do I solve this problem?

Note: I will perform the OTP through a different function at a later stage, but right now I want it to be recorded only at the registration stage.

  register: RequestHandler = async (req, res) => {
    const { data, error } = await supabaseAnon.auth.signUp({
      email: req.body.email,
      password: req.body.password,
      phone: req.body.phone,
      options: {
        data: {
          username: req.body.username,
          first_name: req.body.first_name,
          last_name: req.body.last_name,
          birthday: req.body.birthday
        }
      }
    })

error :
{
    "message": {
        "name": "AuthApiError",
        "message": "null value in column \"phone\" of relation \"users\" violates not-null constraint",
        "status": 500
    }
}
Was this page helpful?