verification_sdk 1.2.2
verification_sdk: ^1.2.2 copied to clipboard
Flutter SDK for multi-stage identity verification with camera, webview and KYC flows for mobile and web apps.
1.2.2 — 2026-02-08 #
Added #
-
Aadhaar OCR front and back images included in SDK callbacks
- Aadhaar front and back captured images are now attached with their respective OCR responses sent to host apps.
- Images are shared as Base64-encoded data to ensure platform-safe transmission.
- Callback payload optionally includes:
captured_image.type:base64captured_image.value: Base64 string of Aadhaar image
- Images are appended to:
aadhaar_ocr_front.captured_imageaadhaar_ocr_back.captured_image
- Enables host apps to store Aadhaar images alongside OCR data and avoid re-requesting images.
-
Aadhaar OCR image selection enhancement
- Users can choose Aadhaar images either by clicking from camera or uploading from gallery for both front and back sides.
- A bottom-sheet picker allows selection between Camera and Gallery, improving flexibility and success rate.
-
Improved OCR retry UX
- If OCR fails for front or back:
- User is prompted to retry.
- Only the failed side is cleared for recapture instead of restarting the entire flow.
- If OCR fails for front or back:
Changed #
-
Presigned upload flow removed in production.
- Face-match now sends images directly as multipart form-data:
image1: Aadhaar imageimage2: Selfie image
- Face-match now sends images directly as multipart form-data:
-
Face-match success threshold increased.
- Match score must now be greater than 70% to be considered successful.
-
Processing overlay and navigation flow hardened.
- SDK consistently uses a safe host/root navigator context.
- Ensures only one bottom sheet is visible at a time (Choice / OCR / Processing).
- Prevents black or blank background states during screen transitions.
Fixed #
- Removed presign-related network paths causing failures in production.
- OCR failure flow no longer exits the SDK; user remains inside verification with a clear retry option.
- DigiLocker integration reliably surfaces fetched Aadhaar XML to host callbacks.
- Navigation stack cleanup fixes:
- Aadhaar Choice and OCR screens are properly removed after success.
- Overview screen is restored with the host app visible in background.
Integration Notes #
-
Backend
- Support multipart requests for face-match:
image1(Aadhaar)image2(Selfie)
image2_urlremains supported for backward compatibility.
- Support multipart requests for face-match:
-
Host Apps
- Expect enriched callback payloads after verification:
digilocker_xmlaadhaar_ocr_front.captured_image(Base64, optional)aadhaar_ocr_back.captured_image(Base64, optional)
- Image fields may be large; avoid logging or persisting Base64 image data insecurely.
- Expect enriched callback payloads after verification:
-
UX
- Camera/Gallery chooser improves OCR success on low-end devices and avoids repeated camera permission issues.
-
Security
- Aadhaar image data is sensitive PII and must be handled securely by host applications.
1.2.0 — 2026-01-31 #
Added #
- Aadhaar OCR image selection enhancement
- Users can now choose Aadhaar images either by clicking from camera or uploading from gallery for both front and back sides.
- A bottom-sheet picker is shown to let users select Camera or Gallery, improving flexibility and reducing friction.
- OCR retry UX improved:
- If OCR fails for front or back, user is prompted to retry.
- Only the failed side(s) are cleared for recapture instead of restarting the entire flow.
Changed #
- Presigned upload flow has been removed in production.
- Face-match now sends images directly as multipart form-data:
image1: Aadhaar imageimage2: Selfie image
- Face-match now sends images directly as multipart form-data:
- Face-match success threshold increased:
- Match score must now be greater than 70% to be considered successful.
- Processing overlay and navigation flow hardened:
- SDK consistently uses a safe host/root context.
- Ensures only one bottom sheet is visible at a time (Choice / OCR / Processing).
- Prevents black background states when transitioning between screens.
Fixed #
- Removed presign-related network paths that were causing failures in production environments.
- OCR failure flow no longer closes the SDK:
- User remains inside the verification flow with a clear retry option.
- DigiLocker integration now reliably surfaces fetched Aadhaar XML to host callbacks.
- Navigation stack cleanup fixes:
- Aadhaar Choice and OCR screens are properly removed after success.
- Overview screen is restored with the host app visible in background.
Integration Notes #
- Backend
- Support multipart requests for face-match:
image1(Aadhaar)image2(selfie)
image2_urlremains supported for backward compatibility.
- Support multipart requests for face-match:
- Host Apps
- Expect
digilocker_xmlin callbacks after DigiLocker verification. aadhaar_front_base64,aadhaar_front_path, andselfie_base64are optional and may be large.- Avoid logging or persisting base64 image data insecurely.
- Expect
- UX
- Camera/gallery chooser improves success rate on low-end devices and avoids repeated camera permission issues.
- Accuracy
- Updated face-match threshold may require backend tuning for optimal production accuracy.
1.1.4 — 2026-01-31 #
Added #
- SDK now returns
digilocker_xmlin host callbacks after a DigiLocker fetch; includesaadhaar_front_base64andaadhaar_front_pathwhen available. - OCR failure retry UI: when OCR fails for a side, the SDK prompts the user to retry and clears the failed side for recapture.
Changed #
- Removed presign upload flow in production; face-match now sends both images directly as multipart (
image1+image2) by default. - Face-match success threshold raised to require match > 70%.
- Processing overlay and navigation handling hardened to use a safe host/root context and avoid inadvertent SDK closure on errors.
Fixed #
- Presign-related requests that caused production failures have been removed.
- OCR failure path no longer closes the SDK; it now surfaces a retry option and clears only the failed side(s).
- DigiLocker flow now reliably surfaces fetched Aadhaar XML to host callbacks.
Integration Notes #
- Server: support multipart
image1(Aadhaar) andimage2(selfie).image2_urlremains supported for backward compatibility. - Host apps: expect
digilocker_xmlin callbacks and optionalaadhaar_front_base64/aadhaar_front_path. selfie_base64andaadhaar_*_base64can be large — avoid logging or persisting them insecurely.- Face-match threshold change may require coordination with backend tuning for production accuracy.
1.1.3 — 2026-01-30 #
Added #
- Direct face-match multipart upload: client can now POST both Aadhaar (
image1) and selfie (image2) files in a single request viapostFaceMatchWithFiles. - Face-match callbacks include
selfie_pathandselfie_base64on success (base64 included when encoding succeeds).
Changed #
- Replaced presigned selfie-upload +
image2_urlflow with direct multipart file upload by default; client now sendsimage1+image2. - Simplified debug logging for face-match (removed presign-specific logs).
Fixed #
- Presign-related failures no longer block face-match resolution.
- Reduced edge cases where presigned upload race conditions interfered with camera lifecycle.
Integration Notes #
- Server: support for multipart
image1(Aadhaar) andimage2(selfie) is required;image2_urlis still accepted for backwards compatibility. - Host apps: ensure a valid
sessionTokenand accessible Aadhaar front image file before invoking face-match. selfie_base64can be large — avoid logging or storing it insecurely.
1.1.2 — 2026-01-24 #
Added #
- Enforced circular viewfinder in Face Match UI:
- Camera preview and captured image are constrained to a fixed square so
ClipOvalrenders a perfect circle on all devices.
- Camera preview and captured image are constrained to a fixed square so
- Face-match callbacks now include selfie details:
selfie_pathis always provided on success;selfie_base64is included when encoding succeeds.
- Small debug logging improvements to help trace upload/presign steps.
Changed #
- Face Match preview sizing: preview is forced to a 260×260 square to avoid aspect-ratio distortions that previously produced an oval viewfinder.
- Improved error and lifecycle signaling around selfie upload and processing; host callbacks receive clearer success/failure payloads.
Fixed #
- Fixed an issue where the viewfinder could appear oval on some devices due to non-square preview constraints.
- Ensured selfie data is sent to host callbacks even when base64 encoding fails (fallback to
selfie_path).
Integration Notes #
selfie_base64can be large; host apps should avoid logging or persisting it insecurely.- No API contract changes: face-match still uploads selfie to presign and sends
image2_urlto server.
1.1.1 — 2026-01-16 #
Added #
- Face-match presigned upload flow:
- Selfie is uploaded to a presigned URL and
image2_urlis sent to the face-match API (matches server contract).
- Selfie is uploaded to a presigned URL and
- Debug logging for face-match:
- Token preview, file paths and sizes, and the raw server response are now logged to help trace requests.
- Aadhaar OCR callback enhancements:
aadhaar_front_pathandaadhaar_back_pathare provided to host callbacks.- Optional
aadhaar_front_base64andaadhaar_back_base64included when encoding succeeds.
- Fail-fast error propagation:
- Service-side error objects are surfaced to the UI and host callbacks so issues are visible immediately.
Changed #
- Face match invocation:
- Client now uses
postFaceMatch(file +image2_url) after uploading selfie to presign instead of sending two files directly.
- Client now uses
- Aadhaar OCR UI and camera handling:
- Ensured camera is released between flows with a short cooldown and
endOfFramewaits. - Prevents duplicate camera/API calls on rapid taps.
- Ensured camera is released between flows with a short cooldown and
- Improved stage lifecycle signaling:
- Stage events include clearer
stage_started,stage_completed, andstage_failedsemantics and now carry error details when available.
- Stage events include clearer
Fixed #
- 422 error from face-match due to missing
image2_url— now fixed by uploading selfie and sending URL. - Silent client-side swallowing of server error payloads — errors now surface in dialogs and callbacks.
- SDKState now stores Aadhaar front base64 when available; callbacks include file paths/base64 for host consumption.
- Minor camera lifecycle issues in OCR flow (release/timing) resolved.
Integration Notes #
- Host must provide a valid
sessionTokenand environment to the SDK for API requests. - Presign response format: server should return usable presign
urlandfields/headersas appropriate. Client supports both POST-form and PUT-style presigns. - The SDK logs face-match request/response details to the Flutter console — remove or filter these logs in production as needed.
1.1.0 — 2026-01-12 #
Added #
-
Unified verification flow stability layer
- Centralized lifecycle handling for Camera, WebView, and native intents.
- Prevents overlapping platform surfaces (camera/webview/image picker).
-
Deterministic navigation stack management
- SDK guarantees a single active verification surface at any time.
- Explicit teardown of obsolete routes before launching the next stage.
- Prevents previous screens from bleeding through behind bottom sheets.
-
Face Match threshold control
- Configurable face-match threshold (default: 10% for testing; backend-driven for production).
- Match percentage normalized and exposed via callbacks.
-
Strict stage gating
- Face Match can only be launched after Aadhaar verification.
- OCR/DigiLocker stages become terminal once completed.
-
Improved host signaling
- Introduced a clearer stage lifecycle:
stage_startedstage_completedstage_failed
- Introduced a clearer stage lifecycle:
Changed #
-
Camera architecture hardening
- Enforced single-camera ownership between
image_pickerandcamera. - Ensures camera resources are fully released before reinitialization.
- Added a cooldown window between camera transitions.
- Enforced single-camera ownership between
-
Bottom-sheet rendering model
- SDK screens now render on a dedicated opaque layer.
- Host app UI is fully hidden during verification.
- Eliminates background leaks and black flashes.
-
OCR → Overview → Face Match flow
- Overview screen is the only gateway to Face Match.
- Direct navigation from OCR to Face Match is blocked.
-
API invocation behavior
- APIs now fail fast on malformed responses.
- Removed implicit success assumptions in client logic.
- Response validation enforced before stage completion.
Fixed #
- Android
BLASTBufferQueueerrors caused by unreleased camera frames. - Black screens when pushing non-opaque routes over camera surfaces.
- Aadhaar OCR UI remaining visible behind Face Match bottom sheets.
- Camera freezes when
simulate: falseon slower networks. - Multiple
Proceedtaps triggering duplicate API calls. - Navigator context disposal edge cases.
Performance Improvements #
- Reduced camera initialization latency on mid-range Android devices.
- Fewer widget rebuilds during camera preview.
- Lower memory churn during OCR → Overview transitions.
Known Issues #
- Some OEM camera implementations may still log low-level warnings.
- WebView stability depends on system WebView version.
- Backend APIs must return meaningful validation fields.
Integration Notes #
- Do not open host-side camera while SDK is active.
- Always launch the SDK using the provided entry point.
- Recommended Android override:
dependency_overrides: camera_android: ^0.10.8
1.0.0 — 2026-01-05 #
Added
- Initial public release of the
verification_sdkFlutter package. - End-to-end verification flow:
- Mobile OTP request & verification.
- DigiLocker OIDC integration to fetch Aadhaar XML via WebView.
- Front-camera selfie capture and face-match against Aadhaar photo (presigned upload support).
- Host integration hooks:
VerificationSDK.initialize(...)with optional branding (brandLogoUrl,brandTitle,primaryColor) andmobileNumber.VerificationSDK.startVerification(context, callbacks: ...)to launch the flow.VerificationCallbacksforonStageComplete,onError, andonComplete.
- Local example app (example) demonstrating SDK initialization and launch.
- Theming support: primaryColor can be provided as hex string or integer in userData.
Changed
- Consolidated upload helper for presigned URL flows supporting POST-form and PUT presigns.
- Inline face-match UX: captured selfie stays on-screen with a small inline “Processing” spinner; full-screen processing overlay used only when intentionally invoked.
Fixed
- Robust navigator handling: SDK stores root
NavigatorStateat startup to safely close and restore host UI. - Camera lifecycle fixes to avoid preview/dispose races on common devices.
- Temporary client-side fix for presign PUT signature issues (adds required headers when server signs them). (Recommendation: backend should remove signed headers or document required client headers.)
Known Issues
- Some Android emulators may show camera2 warnings ("Handler ... on a dead thread") — mitigations added; recommend testing on physical devices.
- WebView renderer crashes can occur on some emulator/system WebView versions; test Digilocker flows on target devices.
- Server presign contract: server should avoid signing headers that the client may not include. See integration notes.
Integration Notes
- Ensure
AndroidManifest.xmlcontains camera and internet permissions. - Add
NSCameraUsageDescriptionin iOSInfo.plist. - Pass a valid
sessionTokenfrom your backend for API calls. - Test the example app on a physical device for best camera/WebView results.
Contact
- For integration support, provide
clientId/environment details and samplesessionTokenacquisition flow to the SDK team.