SDKs 4.2.0, limit liveness attempts, and decline injected camera feeds by default
A session is now declined when the applicant fails the liveness check 3 times, the way it can be for one-time codes. A workflow can allow fewer tries, or turn the limit off. Presence Intelligence and Document Intelligence also get their own setting for an injected camera feed, which declines by default.
Added
- Maximum liveness attempts, a setting on the Presence Intelligence step (
maxLivenessAttempts, 1 to 3, orfalseto turn it off). It is on by default: a workflow that does not set it allows 3 failed checks. Each failed liveness check counts, across the desktop and phone legs of one verification. After each failure the SDKs say how many attempts are left. At the limit the liveness step is charged and the session is declined withreasonCodeliveness_attempts_exceeded: thesession.declinedwebhook fires,GET /api/v1/status/:idreadsdeclined, and later requests on the session answer409 session_declined. Not offered for Passive Liveness, which has no check to fail during the flow. - Injection attack detected, a setting on the Presence Intelligence step (
livenessInjection:approve,reviewordecline). It acts when the liveness recording shows the camera feed was replaced (a virtual camera, a generated feed or a hooked camera). - Injection attack detected for documents, a setting on the ID Verification step (
documentInjection:approve,reviewordecline). It acts when a document captured with the camera was fed in rather than captured live by the device camera; today that is a recording of the capture that plays on a loop, as a virtual camera does. Results carrydocumentInjection(detected,clearornot_checked, with each side’s status) on the webhook, the verification result and each ID of a multiple-ID verification, and workflows can branch onverification.documentInjection. An uploaded document or a server submission readsnot_checked. In sandbox,sandboxOutcome: document_injectionmakes the capture read as injected. No extra charge.
Changed
- An injected camera feed now declines by default. A verification whose liveness recording shows a replaced feed fails with
virtual_camera_detectedunless the workflow chooses Review or Approve. It used to go to review through the Device Intelligence virtual camera rule, and did nothing when Device Intelligence was off. That rule now covers only virtual cameras the SDK reports itself, and keeps its Review default. - A borderline selfie now goes to review instead of being declined. A selfie that fails only on its face match (
reasonCodeselfie_mismatchwith the data matching) and scores no more than 10 below the pass mark, so 70 to 79 at the default 80, is sent to manual review by default. The verification result is unchanged (FAILED,selfie_mismatch, with itsfacialConfidence); the workflow’s decision is review, as it already was with a review band set in the builder. A workflow that set its own review band, or any decision rule onverification.facialConfidence, keeps it. To keep pass or fail only, remove the review band in the facial match threshold (stored asfacialReviewBand: false). - An injected document capture also declines by default, with the new
reasonCodedocument_injection, unless the ID Verification step’s Injection attack detected is set to Review (held for review, no rule needed) or Approve. Signs of forgery or tampering on a document are a different check and still go to review.
What you need to do
To keep sending injected feeds to review, set Injection attack detected to Review on the Presence Intelligence step, and on the ID Verification step for documents, and publish. Handle document_injection like virtual_camera_detected. The liveness limit is on: treat liveness_attempts_exceeded like contact_attempts_exceeded, a final outcome, or turn Limit liveness attempts off to keep unlimited retries. Expect borderline selfies in your review queue rather than declined; remove the review band to keep declining them. The limit needs the 4.2.0 SDKs below; older SDKs do not report failures, so their applicants keep unlimited retries.
SDKs 4.2.0
@toden/react 4.2.0, @toden/react-native 4.2.0 and toden_flutter 4.2.0 are out. The mobile SDKs skip 4.1.0, so all three share one number. Each package’s changelog lists every change.
- The liveness limit. Each failed face check is reported, the failure panel shows the attempts left as a small warning, and the flow ends on a declined screen (“We couldn’t verify your face”) at the limit, with
onErrorreceivingsession_declinedonce. - Declined sessions and used-up codes. A session declined after too many incorrect codes ends on its own screen instead of an error, and a used-up code field stays closed until a new code is sent.
- An explanation before the chip read on React Native and Flutter: how to hold a passport or card, with the photo page ticked when it was already read. The read starts on Continue.
- Android release builds scan again in Flutter. R8 removed the classes ML Kit starts from, so 4.0.0 and 4.0.1 release builds never detected a document or a face. The SDKs’ keep rules now cover them (React Native too).
- Each document side is submitted with its own recording, or none, never one left from an earlier capture of that side.
- Your organisation’s logo and the device’s light or dark setting by default, when neither your app nor the workflow sets them.
To upgrade:
- Web:
npm install @toden/react@4.2.0. See the Web SDK guide. - React Native:
npm install @toden/react-native@4.2.0, then rebuild your Android app once so its release build picks up the keep rules. See the React Native SDK guide. - Flutter:
toden_flutter: ^4.2.0inpubspec.yaml,flutter pub get, then rebuild. See the Flutter SDK guide.