• Registers a new user with the provided email, password, and name information.

    Sends a POST request to the signup endpoint to create a new user account.

    Parameters

    • email: string

      The user's email address.

    • password: string

      The user's password.

    • firstName: string

      The user's first name.

    • lastName: string

      The user's last name.

    Returns Promise<{ error?: string; token?: string }>

    An object containing either the user token on success, or an error message on failure.