@bytexbyte/berifyme-react-sdk
v1.2.8
Published
Production release: `@bytexbyte/[email protected]`, from `main`.
Maintainers
Keywords
Readme
Berify.me React SDK
Production release: @bytexbyte/[email protected], from main.
npm install --save-exact @bytexbyte/[email protected]Use Node 22.23.4 for SDK development. Build both ESM and UMD before packing.
Script-tag deployments must include the entire umd/ directory, including lazy
chunks and fonts. React and ReactDOM are supplied by the consuming application.
The package version does not select the backend. berifyme.environment.Idv
uses https://backend.berify.me and QR links to https://idv.berify.me.
berifyme.environment.Staging uses https://backend.staging.berify.me and
https://idv.staging.berify.me. Use credentials for the selected environment.
Production retains its existing provider selection and SnapMatch callback fields:
id, fullName, phoneNumber, email, age, and birthDate.
Incode 2.x migration
This branch migrates the WebSDK's Incode integrations to @incodetech/core and
@incodetech/web 2.3.2. IDV, face login and mobile SDK wallet verification were accepted
using the development build before this production release. @incodetech/welcome and its bundled API-key
initialization have been removed. Sessions continue to come from the existing
Berify.me backend.
The normal SDK import now uses 2.x for all Incode features. Existing component props and callbacks remain available:
"use client";
import berifyme from "@bytexbyte/berifyme-react-sdk";
import type { ComponentProps } from "react";
export function Verification(props: ComponentProps<typeof berifyme.modal>) {
return <berifyme.modal {...props} />;
}
export function FaceLogin(props: ComponentProps<typeof berifyme.snapMatch>) {
return <berifyme.snapMatch {...props} />;
}The earlier @bytexbyte/berifyme-react-sdk/snap-match-v2 subpath remains available.
It is no longer required to avoid the legacy Incode import. The modal loads after
browser mount to keep browser-only vendor code out of server rendering. React
and ReactDOM are peer dependencies (^18.3.1 || ^19.0.0), supplied by the host.
The automated Next integration fixture uses React 19.2.6.
| Feature | 2.x integration | Preserved behavior |
| --- | --- | --- |
| SnapMatch | Authentication actor + shared Selfie UI | Existing snapMatch Flow; 1:N; candidate lookup |
| Face login | Authentication actor + shared Selfie UI | faceLogin Flow; 1:1; exact expected identity |
| Consent | Consent manager + incode-consent | Existing English/Chinese consent IDs and required checkbox submission |
| Document capture | ID manager + incode-id | Existing ID Flow configuration; document processing and backend approval |
| Selfie | Selfie manager + incode-selfie | Server upload/liveness; processing remains a separate Berify.me step |
| Watchlist | v2 public HTTP client | Failed checks remain failures; save Berify.me results before advancing |
| Face/document match | Face Match manager + incode-face-match | Both match and liveness must explicitly pass |
| Finish | v2 session finish API | Existing Berify.me approval endpoint remains authoritative |
| Age estimation | Migrated capture/processing modules | Existing thresholds, two sessions, server-side selfie transfer, OCR/score checks and approval |
Document capture defers ID processing to the existing separate step, which sends
the required empty queueName parameter. This prevents duplicate processing
before the selfie step. All modules use the session API root ending in /0.
The age flow still avoids asking for a second selfie after transfer. The pinned
2.3.2 Selfie config's skipProcessFace option defers processing until the existing
Berify.me processing/approval stage; it does not bypass protected upload or
liveness checks. This split-processing option is marked internal by Incode and
must be rechecked when updating the vendor version.
All Incode operations share a session lease so a second capture or processing request cannot overwrite an active session token. Cancellation stops module managers and aborts processing requests. Authentication requires explicit capture PASS, then finishes/closes the session and reads its server score. Overall, authentication and liveness must all be OK, and the authenticated identity must be present; 1:1 additionally requires the expected identity. This handles 2.3.2 returning PASS with an empty capture candidate. Capture completion and generic Flow completion do not grant approval. Client checks do not replace server verification.
The existing English/Chinese/mixed copy is supplied through the v2 translation API, with bundled v2 defaults for new keys. Brand color, logo overlays and the Dashboard's document chooser subtext remain wired. New camera screens still need visual review on target phones. GeeTest, other identity providers and the native SDK's hosted pages are outside this WebSDK migration.
Validation
# Use the repository's Node version.
npm ci
npm run build:clean
npm run build:umd
npm run test:incode-v2
npm pack
cd test/next16
# Install the actual package archive; the runtime probes also use its compiled code.
npm ci --install-links
npm install --no-save --package-lock=false ../../bytexbyte-berifyme-react-sdk-1.2.8.tgz
npm run build
# Also check the alternate Next bundler:
npm run build:webpack
npm startRun npm run test:browser from test/next16 in another terminal. Chrome is
required; set CHROME_BIN if the default macOS installation path is unavailable.
The runner intercepts every external request and uses dummy tokens. Use the
runner for these offline tests; opening a fixture manually does not apply that
interception. Stop the local server after testing.
The suite covers identity binding, match/liveness rejection, cancellation, concurrent modules and Watchlist persistence ordering. The Next fixture checks production builds and browser loading of the default SDK, SnapMatch, normal and age modals. It also exercises the real 2.x processing APIs and Consent/Face Match UI with simulated API replies, including failed screening and matching. Authentication completion tests cover empty capture candidates, server identity binding, failed liveness and failed completion requests. It does not capture a real face/document or validate production identity matching.
Before release
Verify Incode account eligibility and real Flow configuration, especially 1:N: Incode's 2.3.2 standalone authentication types/documentation describe 1:1, so a Flow appearing in the Dashboard alone does not prove runtime compatibility. The adapter rejects mismatched modes instead of changing them.
Test consenting enrolled and unknown users, wrong-identity login, liveness and match failures, expired documents, required consents, screening failures, age pass/document-fallback paths, denied camera permission, cancellation, language switching and repeat scans. Confirm selfie transfer and backend approval use the correct second session, returned candidate IDs map to existing Berify.me users, and camera access ends when closing the UI.
The hosted website and npm SDK have separate delivery paths. The hosted IDV and face-login fixes are included here, but website acceptance tests do not replace real-device testing inside a consuming SDK application. Consumers must install the new package and rebuild; a website deployment does not update their SDK. This release is published as 1.2.8; existing published versions are immutable.
References: Authentication, ID Capture, Selfie, Consent, Face Match, Watchlist.
