Skip to content

Liveness Support Checker Example

Josselin Guillozet edited this page Oct 19, 2026 · 3 revisions

Target version: 7.0+

Below is how to check that a device is capable of running a transaction on a given webpage:

import { iProovSupport } from "@iproov/web-sdk/iProovSupport.js"

const checker = new iProovSupport(console)

const { supported, granted, tests, flags } = await checker.check({ emit: false })

ℹ️ There is no assurance-type option. Motion permission has been required for both Dynamic and Express since v5.0.0, so the same checks run either way. An assuranceType value passed to the constructor is accepted but ignored — earlier versions of this page showed one, and it never had any effect.

Here is a breakdown of the results:

  • supported is a boolean value indicating whether this device can run a transaction on the webpage
  • granted is a boolean or null value indicating true if permission was granted, false if permission was denied, or null if permission was not requested
  • tests is an object of test results mapping to their results. If supported or granted is false, then the relevant support test that failed the check will be set to false inside tests
  • flags describes how the page is framed rather than passing or failing anything: in_iframe, cross_origin_iframe, and requires_iframe_bridge when the claim will have to be handed to a top-level tab

The tests keys are videoInput, wasm, userMedia, frontCamera, fullscreen, browser, gyro and localStorage. Each is null if unchecked, true if supported and false if not.

To pre-warm permissions, instead of check, you will need to run:

const { supported, granted } = await checker.checkWithPermission()

If granted === false, then either the camera or device motion permissions will have been denied by the user.

Clone this wiki locally