Repository navigation
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
formatErroroption controls the displayed message. - HIS payload v2. The Human Interaction Signature collector captures clicks, key timings, untrusted events and the
webdriverflag.
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 showError: <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
verifyingstate. - Translations use the typographic apostrophe (
’, U+2019) instead of the ASCII'(en, af, fr-fr, fr-ca, it, lb, mt); Uzbekoʻ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, setformatError: () => null.