Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Ondato’s OnAge solution allow your customers to complete the process from anywhere, with any device, in a matter of seconds. With this method, Ondato employs AI and machine learning to gather and analyse biometric data, which is then used to create a 3D map of the customer’s face and accurately place them in an age group without gathering or storing any personal data. With a quick selfie, we are able to perform liveness checks, preventing any spoofing attempts or masks from getting through while keeping the steps easy for your clients.

...

📁 Table of Contents

Table of Contents
stylenone

ℹ️ Introduction

...

Example script (link to script guide)

🔢 Latest version

  • The most recent version is v2.0.0.

  • See the Changelog for additional details.

🚥 Compatibility

  • 🟢 Supported: Only web browsers (Chrome, Firefox, Safari, Edge etc.).

  • 🔴 Not supported: Native application languages like React-Native, Flutter etc.

📂 Getting started with npm

To begin, run the following command:

Code Block
npm install @Ondato-public/idv-sdk

☑️ Prerequisites:

  • Adjusted .npmrc file with custom registry.

Code Block
breakoutModewide
@ondato-public:registry=https://pkgs.dev.azure.com/Ondato/PublicNPM/_packaging/ondato-public-npm/npm/registry/

...

Obtain the static OnAge setup id.

...

Verify the Web browser version limitations.

  • Refer to the documentation here.

...

Info

Ondato’s OnAge solution allow your customers to complete the process from anywhere, with any device, in a matter of seconds. With this method, Ondato employs AI and machine learning to gather and analyse biometric data, which is then used to create a 3D map of the customer’s face and accurately place them in an age group without gathering or storing any personal data. With a quick selfie, we are able to perform liveness checks, preventing any spoofing attempts or masks from getting through while keeping the steps easy for your clients.

...

...

📁 Table of Contents

Table of Contents
stylenone

...

ℹ️ Introduction

The current flow only allows using the Web Browser SDK by installing it through npm🔗 or using it as a script.🔗

...

🔢 Latest version

  • Latest Major version is v2.x.x

  • Refer toChangelog for latest versions and changes.

...

🚥 Compatibility

  • 🟢 Supported: Only web browsers (Chrome, Firefox, Safari, Edge etc.).

  • 🔴 Not supported: Native application languages like React-Native, Flutter etc.

...

📂 Getting started with npm

To begin, run the following command:

Code Block
npm install @ondato-public/idv-sdk

...

☑️ Prerequisites:

  • Adjusted .npmrc file with custom registry.

Code Block
breakoutModewide
@ondato-public:registry=https://pkgs.dev.azure.com/Ondato/PublicNPM/_packaging/ondato-public-npm/npm/registry/
  • Obtain the static OnAge setup id.

  • Verify the Web browser version limitations.

    • Refer to the documentation here.

  • Review npm examples for a better understanding.

📂 Example npm

Expand
title|| CLICK TO VIEW SNIPPET ||
Code Block
// Typescript React example
import { memo, ReactElement, useCallback, useState } from 'react';

import { 
  IdvLanguage, 
  load, 
  SdkMode, 
  version,
  SdkLoadResult,
  SdkOnSuccessResult,
  SdkOnFailureResult,
  SdkOnCloseResult } from '@ondato-public/idv-sdk';

export const AppNew = memo((): ReactElement => {
  const [onAgeSetupId, setOnAgeSetupId] = useState('');

  const [language, setLanguage] = useState('');

  const [sdkOnAge, setSdkOnAge] = useState<SdkLoadResult | null>(null);
  const [isLoaded, setIsLoaded] = useState(false);

  const loadHandlerOnage = useCallback(() => {
    try {
      const onAge = load({
        mode: SdkMode.Sandbox,
      });

      setSdkOnAge(onAge);
      setIsLoaded(true);
    } catch (error) {
      console.warn('OnageSdkLoadFailure', error);
      alert(`OnageSdkLoadFailure, ${error}`);
    }
  }, []);

  const beginHandlerOnAge = useCallback(async () => {
    try {
      if (sdkOnAge?.onAge.begin) {
  
        await sdkOnAge.onAge.begin({
          onAgeSetupId: onAgeSetupId.trim(),

          language: language.trim() as IdvLanguage,
          onSuccess: (props: SdkOnSuccessResult) => {
            console.log('onSuccess', { props });
            alert(`onSuccess, OnAge: ${props}`);
          },
          onFailure: (props: SdkOnFailureResult) => {
            console.log('onFailure', props);
            alert(`onFailure, OnAge: ${props}, reason: ${props}}`);
          },
          onClose: (props: SdkOnCloseResult) => {
            console.log('onClose ', props.id);
          },
        });
      }
    } catch (error) {
      console.warn('OnAgeSdkBeginFailure', error);
      alert(`OnAgeSdkBeginFailure, ${error}`);
    }
  }, [sdkOnAge?.onAge, onAgeSetupId, language]);

  const versionHandler = useCallback(() => {
    alert(version());
  }, []);

  const endHandlerOnAge = useCallback(() => {
    sdkOnAge?.onAge.end();
  }, [sdkOnAge]);

  return (
    <>
      <button type="button" disabled={isLoaded} onClick={loadHandlerOnage}>
        Load OnAge
      </button>
      <button type="button" onClick={versionHandler}>
        SDK version
      </button>
      <button type="button" disabled={!isLoaded} onClick={beginHandlerOnAge}>
        Begin On age
      </button>
      <button
        type="button"
        className="end-action"
        onClick={endHandlerOnAge}
        disabled={!isLoaded}
      >
        X
      </button>
      <button
        type="button"
        className="end-action"
        onClick={endHandlerOnAge}
        disabled={!isLoaded}
      >
        X
      </button>
      <div className="input-group">
        <input
          type="text"
          placeholder="OnAge setup Id"
          value={onAgeSetupId}
          onChange={(event) => setOnAgeSetupId(event.target.value)}
        />
        <input
          type="text"
          className="short-input"
          placeholder="en-GB (optional)"
          value={language}
          onChange={(event) => setLanguage(event.target.value)}
        />
      </div>
    </>
  );
});

...

📜 Typescript:

  • Full TypeScript support is available. (Link to typescript files)

...

📂 Getting started with javascript Script

...

Code Block
<script src="{baseUrl}/indexondato-sdk.2.x.x.min.js"></script>

...

☑️ Prerequisites:

  • Download the script file.

  • Ensure the script is configured with the correct OnAge library build file in the index.html.

  • Obtain the static OnAge setup id.

  • Verify the Web browser version limitations.

    • Refer to the documentation here.

...

Code Block
import { load } from '@Ondato@ondato-public/idv-sdk';

const exampleSdk = load({ mode: SdkMode.Sandbox });

...

🗃️ Examples
Status
colourYellow
titleto-do

  • Npm zip file (Add file files)

  • Script zip file (Add file files)

...

❔ Frequently Asked Questions (FAQs)

  • Why should both the begin()andload()methods be used within a try-catch block?

    • Both methods should be utilized within a try-catch block to ensure proper error handling.

  • What happens to the session id during an F5 (page refresh)?

    • In the event of an F5 (page refresh), the same session id will be retained, allowing the same session to be loaded seamlessly.

  • Where can I find a list of available languages?

...