Good dev knows: post #263 — TG.ME

🙎 Face Liveness Check

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
YouTube
Validate live users from spoof attacks with Amazon Rekognition Face Liveness | Amazon Web Services
Watch this demonstration video to see how Amazon Rekognition Face Liveness analyzes a short selfie video to detect spoofs presented to the camera, such as printed photos, digital photos, digital videos, or 3D masks, as well as spoofs that bypass the camera…
👍8
October 3, 2025 1.2K 4