ease-id
v0.1.3
Published
Liveness detection component
Downloads
4
Readme
介绍
@pp/ease-id 是一个web侧的面部识别组件,提供了活体检测和人脸比对能力
使用方式
1、安装
npm install @pp/ease-id -S
2、人脸比对使用
import { FaceCompare } from '@pp/ease-id';
const privateKey = `xxx`
const props = {
appId: 'K1122334455',
metaInfo: '1234567890',
userId: '51866C2FB9F643B7BA48AE996B312958',
bizId: '1234565',
privateKey,
sourceImage: 'https://static.chuanyinet.com/files/fem17bsaqu1tw3lb/4efda0e0-d4e8-495d-a7b9-cfac89de6e25.png',
}
export default () => <FaceCompare onBack={() => {
history.go(-1);
}} env="development"
onSuccess={(data) => {
console.log(data);
}} {...props} />
3、活体检测使用
import { FaceCheck } from '@pp/ease-id';
const privateKey = `xxxxx`
const props = {
appId: 'K1122334455',
metaInfo: '1234567890',
serviceLevel: 2,
secureLevel: 'STANDARD',
userId: '51866C2FB9F643B7BA48AE996B312958',
bizId: '1234565',
privateKey,
}
export default () => <FaceCheck hideFooter={true} onBack={() => {
history.go(-1);
}} env="development"
onSuccess={(data) => {
console.log(data);
}} {...props} />