Skip to content

Latest commit

 

History

History

demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

iProov Web SDK Example

This demo is a self-contained NodeJS server and minimal frontend which covers:

  • Running a server with a BASE_URL, API_KEY, API_SECRET that you can obtain from https://portal.iproov.com and NPM_ACCESS_TOKEN that you can create once your get access to our private NPM registry (please contact [email protected]).
  • Creating tokens for Genuine Presence and Liveness transactions;
  • Enrolling and verifying;
  • Customising iProov Web with web component slots and CustomEvents.

Running the example:

For a basic example, all you need to run it is Docker and some minimal configuration:

  1. Obtain your environment variables and create a .env file - see .env.example for a template.
  2. From this demo directory, bring up the container with: bash run.sh
  3. Navigate to http://localhost:8080 in any desktop or mobile web browser.

For a deeper dive, you can of course run the server locally using NodeJS 14+:

export $(cat .env | xargs) && node src/server.js

Features

  • Frontend customisation:
  • Backend customisation:
    • You can customise PlatformAPI inside src/platform.js
    • The server side is written in JavaScript and uses Hapi.js
    • iProov Platform API v2 docs
  • Validate endpoint: you can extend the example to implement the validate call
    • Note that in production, it's important that this is implemented on the server side otherwise your API credentials will be exposed!

Support and SSL Certificates

To access the device camera and other browser APIs, a "secure context" is required.

In practice this means running the server under TLS, or simply using localhost.

For this demo, we keep things simple with localhost. But to test on another device on your network like a mobile, TLS is required.