npm install @nstudio/nativescript-onfido
import { OnfidoUtils, Onfido, OnfidoCaptureType } from '@nstudio/nativescript-onfido';
OnfidoUtils.init('<token>', '<app id>');
Onfido.debugMode = true;
Onfido.start({
sdkToken: token,
flowSteps: {
welcome: true,
captureDocument: {},
captureFace: {
type: OnfidoCaptureType.PHOTO,
},
},
}).then(data => {
// onfido data
}).catch((error) => {
// onfido data
});
Apache License Version 2.0