Skip to main content

Example Case & Implementation

Now, after you have finished the basic tutorial and sure that the webview face enrolling & verifying are working correctly by the help of our websocket client helper, it's time to implement it to your own project.

There's two type or method of implementing our WebView client to your project :

First Approach

In the case you have a running web page or mobile apps screen, you can embed our webview client on ifram (for website) or with webview component (for mobile). While on the current page, make sure you have subscribe & listen to our websocket server correctly.

Let's say you have a page / screen when user sees their face verification status, let's call it "KYC Page", then the detail of scenario is as follow :

  • on KYC Page subscribe & listen to the beoty websocket server
  • user click the face recognitation button, than triggered the one of enrolling or verifying (which one is decided by your own)
  • the button will call our webview client as iframe or webview component
  • as soon after user has been completed the face recognitation step, the KYC Page who listened to beoty websocket server, will receive an event response
  • when websocket event response received, you can close our webview client and return user to see the original KYC Page. You can decide what action should be taken regarding of face recognitation response
  • finish

Second Approach

Let's say you have a page / screen when user sees their face verification status, let's call it "Page A", and the other page / screen that designed to embed our webview client (let's call it Page B). Then the detail of scenario is as follow :

  • on Page A subscribe & listen to the beoty websocket server
  • user click the face recognitation button, than triggered to open Page B
  • on the Page B you call the one of enrolling or verifying (which one is decided by your own)
  • as soon after user has been completed the face recognitation step, the Page A who listened to beoty websocket server, will receive an event response
  • close the Page B window or screen, if you have a problem to doing that from the Page A, you can always listen to our websocket server on the Page B too (so you has two page that listen to our websocket server) You can decide what action should be taken regarding of face recognitation response
  • finish
caution

On the web page Apps, we recommended you to embed our webview client on your dedicated page, rather than call our webview client rawly on the web browser, that will expose our webview url (also exposing your liveness_app_key & subject_id). Take a seriously note about this security concern !!!