Skip to content

v3.6.0

Latest

Choose a tag to compare

@ovx ovx released this 12 Nov 03:49

Highlights

  • Actionable error messages. Network failures and API error responses now display the actual error (Error: <message>) instead of the generic "Verification failed".
  • Custom error formatting. The new formatError option controls the displayed message.
  • HIS payload v2. The Human Interaction Signature collector captures clicks, key timings, untrusted events and the webdriver flag.

Features

formatError option

widget.configure({
	formatError: (error) =>
		error.name === 'RequestError' ? `Network problem: ${error.message}` : null
});
  • Signature: (error: Error) => string | null | undefined.
  • Network and API errors have error.name === 'RequestError'.
  • A falsy return value shows the translated "Verification failed" string.
  • Default (null): network and API errors show Error: <message>, all other errors show the translated string.

HIS collector payload v2

The payload now carries v: 2 and adds:

Field Content
click [x, y, t, hold, offsetX, offsetY, pointerType, moves] samples
key [t, hold] samples (timings only; key values are never recorded)
untrusted Count of untrusted (script-dispatched) events, which are no longer sampled
webdriver navigator.webdriver === true

Existing fields are unchanged.

Fixes

  • A failed code challenge verification request no longer leaves the widget stuck in the verifying state.
  • Translations use the typographic apostrophe (’, U+2019) instead of the ASCII ' (en, af, fr-fr, fr-ca, it, lb, mt); Uzbek oʻ uses the modifier letter turned comma (ʻ, U+02BB). [#205]

Upgrade notes

  • Error text shown for network and API failures changes from "Verification failed" to Error: <message>. To keep the previous text, set formatError: () => null.