In-form authentication / verification

Authenticating and verifying the identity of informants and parents during the event application process both offline and online.

It's possible to configure many types of form component that can interact with methods of National ID authentication and verification. Choice of component depends on your business rules and availabilty of the relevant dependencies.

Offline

If your user has no connectivity, and if your country issues a National ID card to users that contains a QR code, then a form field component of QR_READER type can parse the contents of the QR code and pre-populate some fields in the form.

{
  type: FieldType.QR_READER,
  label: {
    id: `event.birth.action.declare.form.section.${page}.field.qr.label`,
    defaultMessage: 'Scan QR code',
    description: 'This is the label for the field'
  },
  id: `${page}.id-reader`
}

Online

If your user has connectivity, then of course it is possible to query a National ID system in 1 of 2 ways.

API integration within an event form

A form field component of HTTP type can connect with an external API. Use it along with a BUTTON allowing you to trigger the request and display progress indication to a user. where you may wish to store a response. Use it with a component like TEXT to display returned results.

In this example, observe how conditionals are used to control the process, exposing it only to a certain user type and disabling when offline. These are optional but introduce a better user experience.

Redirect to NID auth portal from within an event form

A form field component of LINK_BUTTON type can redirect the user to an external NID web interface for authentication. An auuthorised token can then be returned to the form and used in a similar way to the API example above to retrieve further values from the NID system for form pre-population.

Look at this example for an E-Signet redirect. The param &state=fetch-on-mount must be returned in order to re-load the form page at the correct point.

To collect paramters from a redirect URL for use within fields in the form after redirect use QUERY_PARAM_READER.

A LOADER component can render a spinner in the page:

An ID_READER that wraps components in a visually appealing way, and VERIFICATION_STATUS component can provide valuable visual indicators to users and improve overall user experience.

Last updated