Recently, I worked on adopting a new technology, face liveness check, and I’d like to share my findings with you.
You probably know that many companies require their customers to go through a KYC (Know Your Customer) process. It used to be done via a video call, but now it’s mostly asynchronous and automated. Usually, you have to upload some form of ID and take a selfie. Of course, there are 🦹 bad actors who try to bypass verification without doing it properly (identity fraud). So the big question is: how can we reliably validate that there’s a real person in front of the camera?
It turns out there are not only solutions from specialized identity verification providers like Jumio or Onfido, but also a solution from AWS. And the best part — you can integrate it just like any other
AWS service (S3, DynamoDB, etc.)! 🎥 Check out the demo. AWS checks if it’s a real human in front of the camera and returns a confidence score along with a reference image. They even claim it can detect high-quality rubber masks so fraudsters can’t trick the system this way. What I also found amusing is the 🌈 “rainbow dance” the UI makes you do — projecting colors on your face and analyzing the reflections. Honestly, it’s pretty awesome!Another interesting part:
AWS requires you to use their UI for this service. Yes, the UI can be extended, but it comes with some limitations. For example, they provide it only as a React component (+ use proprietary AWS Amplify setup). I had to integrate it into a Vue app, and to my surprise (I’m not really a front-end person), there’s already a way to do this! You can build your React app and then wrap it as a web component (see example).Let’s say we call it
face-liveness-ui. It will produce a face-liveness-ui.js file, which you can then include in any application and simply use as:<face-liveness-ui></face-liveness-ui>
You can even pass parameters and listen for events, e.g.:
host.dispatchEvent(new CustomEvent("face-liveness-ui:success"));The pricing is also quite low it costs less than 2 cents!
Pretty cool stuff ✨

