Socket
Socket
Sign inDemoInstall

asliri-comprehensive-liveness-react-beta

Package Overview
Dependencies
6
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    asliri-comprehensive-liveness-react-beta

ASLIRI comprehensive Liveness for React Component


Version published
Maintainers
1
Install size
3.66 MB
Created

Readme

Source

ASLIRI - COMPREHENSIVE LIVENESS - WEB SDK (React Component) (Beta Version)

This SDK for POC or testing integration development

Description



You can verification face and eye with comprehensive liveness by ASLIRI.
The SDK support for ReactJS / NextJS

Check out the SDK for a simplified integration.

1. Copy wasm folder to public directory

  • wasm folder provided by ASLIRI
  • copy to projectname/public/copyhere...

2. Get your token with ASLIRI Team


3. Install Library via NPM

npm i asliri-comprehensive-liveness-react-beta --save
sample in App.tsx :

import { useEffect, useState } from 'react'

import { CheckAuthentication, ComprehensiveLiveness } from "asliri-comprehensive-liveness-react-beta"

function App() {

  const result = (result:any) => {
    console.log(result.score);
    console.log(result.message);
  };

  const handleError = (err: string) => {
    console.log({ err });
  };

  const [auth, setAuth] = useState("");
  const [apiCalled, setApiCalled] = useState(false);

  const getAuth = async () => {
    const getAuthenticationResult = await CheckAuthentication(
      "provided by ASLIRI"
    );
    setAuth(getAuthenticationResult);

    console.log({ getAuthenticationResult });
  };

  useEffect(() => {
    setApiCalled(true);
  }, []);

  useEffect(() => {
    if (apiCalled) {
      getAuth();
    }
  }, [apiCalled]);

  return (
    <>
      <div>
        <ComprehensiveLiveness
          getAuthentication={auth}
          getResult={result}
          handleError={handleError}
        ></ComprehensiveLiveness>
      </div>
    </>
  );
}

export default App



sample in App.js :

import { useEffect, useState } from 'react'

import { CheckAuthentication, ComprehensiveLiveness } from "asliri-comprehensive-liveness-react-beta"

function App() {

  const result = (result) => {
    console.log(result.score);
    console.log(result.message);
  };

  const handleError = (err) => {
    console.log({ err });
  };

  const [auth, setAuth] = useState("");
  const [apiCalled, setApiCalled] = useState(false);

  const getAuth = async () => {
    const getAuthenticationResult = await CheckAuthentication(
      "provided by ASLIRI"
    );
    setAuth(getAuthenticationResult);

    console.log({ getAuthenticationResult });
  };

  useEffect(() => {
    setApiCalled(true);
  }, []);

  useEffect(() => {
    if (apiCalled) {
      getAuth();
    }
  }, [apiCalled]);

  return (
    <>
      <div>
        <ComprehensiveLiveness
          getAuthentication={auth}
          getResult={result}
          handleError={handleError}
        ></ComprehensiveLiveness>
      </div>
    </>
  );
}

export default App


Thank you.

Note: result score from 0 to 1 (you can manage the score)


Version History

0.0.3

  • Result with object {message, score}

0.0.2

  • Bug Fix Load ACU component

0.0.1

  • Initial release

Keywords

FAQs

Last updated on 02 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc