Skip to content

A Nuxt.js web demo of integrating SingPass Face without CDN. Useful for agencies/organisations under strict security constraints such as internet-facing firewall rules/reverse-proxy flows

Notifications You must be signed in to change notification settings

theodorayy/singpass-face-demo-cdn-free

Repository files navigation

CDN-free SingPass Face Example for HTML5

NDI-api Logo

Instructions

Note: Current version of iProov is 3.1.3 as at 15 January 2021. If the version has changed, simply run npm upgrade on the root folder.

  1. Download this repo
  2. On macOS, install npm first if it's not installed.
  3. Then, run run.sh in Terminal. It will run a http-server package using npx.

Source Code

dist folder

/dist contains the build files for a static Vue.js SPA using the Nuxt framework. It also contains the offline build for iProov dependencies.

The nuxt dependencies of code-prettify and materialdesignicons.min.css had been updated to read from local directory instead of cdn.

To download the code-prettify, refer to code-prettify npm package for all the files. You should be able to download the package from there. Here are the next steps on what you need to do:

  1. Unzip the package
  2. Copy the code-prettify folder into /dist

To download the materialdesignicons.min.css, refer to materialdesignicons cdn. Create a blank materialdesignicons.min.css file and copy the content into it.

How it works

We have a QuickStart backend portal where your frontend (this POC) code can call to retrieve the iProov token and validate results.

The assets source at https://cdn.iproov.app/ – where the typography, verification engine, and other files are stored in a CDN.

To download the assets files, refer to iProov's npm package for all the files. You should be able to download the package from there. Here are the next steps on what you need to do:

  1. Unzip the package
  2. Copy the iproov-assets folder into /dist

Since this simple POC is using http-server to serve the static content, it serves through port 8080. We've hard-coded assets_url to point to assets_url="/".

You could take a look at this implementation in the /pages folder.

Development

To tinker or run the dev server, simply run the following in Terminal:

  1. npm install
  2. npm run dev

Support/Queries

Please contact [email protected] if you have any queries.

Acknowledgements

iProov Web SDK Documentation

About

A Nuxt.js web demo of integrating SingPass Face without CDN. Useful for agencies/organisations under strict security constraints such as internet-facing firewall rules/reverse-proxy flows

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published