Web Authentication API for DigitalPersona Access Management
Tutorial
Getting started
Add the package to your project
Using NPM:
npm install @digitalpersona/authentication
Using Yarn:
yarn add @digitalpersona/authentication
Write some code
We recommend using Typescrypt or ES6 modules. Import needed types from the @digitalpersona/authentication module, for example:
import { JSONWebToken, BioSample } from '@digitalpersona/core';
import { FingerprintsAuth } from '@digitalpersona/authentication';
...
async submitFingerprints(samples: BioSample[], identity?: JSONWebToken)
: JSONWebToken | null
{
try {
const api = new FingerprintsAuth(...);
const token = await (
identity
? api.authenticate(identity, samples)
: api.identify(samples)
);
return token;
}
catch (error) {
handleError(error);
return null;
}
}
Using Components
For working examples see a “Bank of DigitalPersona” sample application.