For the complete documentation index, see llms.txt. This page is also available as Markdown.

In-form authentication / verification with E-Signet

This section assumes that you have already read the general National ID - In-form authentication /verification section and understand the basic concepts of the fields which will render in your form when using these helper functions. If you have not read that page, read it first for a high level introduction to the concepts, and then return here.

In the countryconfig-mosip repo, observe helper functions on the mother.ts page ...

A helper function that uses the ID_READER component to render a QR_READER and LINK_BUTTON to redirect users to E-Signet. QUERY_PARAM_READER, LOADER & HTTP components are built in to control the subsequent OIDP_USERINFO requests that E-Signet requires. VERIFICATION_STATUS components broadcast the correct user experience both for E-Signet and offline QR validation.

...getMOSIPIntegrationFields('mother', {
  existingConditionals: [
    {
      type: ConditionalType.SHOW,
      conditional: requireMotherDetails
    }
  ]
})

A helper function that ensures returned values from the requests pre-populate and disable input fields on the form.

connectToMOSIPIdReader(
  {
    id: 'mother.name',
    type: FieldType.NAME,
    required: true,
    configuration: farajalandNameConfig,
    hideLabel: true,
    label: {
      defaultMessage: "Mother's name",
      description: 'This is the label for the field',
      id: 'event.birth.action.declare.form.section.mother.field.name.label'
    },
    conditionals: [
      {
        type: ConditionalType.SHOW,
        conditional: and(requireMotherDetails)
      }
    ],
    validation: [invalidNameValidator('mother.name')]
  },
  {
    valuePath: 'data.name',
    disableIf: ['pending', 'verified', 'authenticated']
  }
),

Last updated