Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// to scan any machine readable travel document (passports, visa's and IDs with
// machine readable zone), use MrtdRecognizer
// var mrtdRecognizer = new BlinkIDReactNative.MrtdRecognizer();
// mrtdRecognizer.returnFullDocumentImage = true;
// var mrtdSuccessFrameGrabber = new BlinkIDReactNative.SuccessFrameGrabberRecognizer(mrtdRecognizer);
// BlinkIDRecognizer automatically classifies different document types and scans the data from
// the supported document
var blinkIdRecognizer = new BlinkIDReactNative.BlinkIdRecognizer();
blinkIdRecognizer.returnFullDocumentImage = true;
blinkIdRecognizer.returnFaceImage = true;
const scanningResults = await BlinkIDReactNative.BlinkID.scanWithCamera(
new BlinkIDReactNative.BlinkIdOverlaySettings(),
new BlinkIDReactNative.RecognizerCollection([blinkIdRecognizer/*, mrtdSuccessFrameGrabber*/]),
licenseKey
);
if (scanningResults) {
let newState = {
showImageDocument: false,
resultImageDocument: '',
showImageFace: false,
resultImageFace: '',
results: '',
showSuccessFrame: false,
successFrame: ''
};
for (let i = 0; i < scanningResults.length; ++i) {