Identity Reuse Module
This guide is specific to Web SDK 2.0. If you are still using 1.x, you can find documentation here. We strongly recommend upgrading - contact your Incode Representative for upgrade information.
The Identity Reuse module recognizes a returning user by matching their selfie against existing on-file biometric records, then offering them the choice to reuse the existing identity (skipping fresh ID + selfie capture) or proceed with a new verification.
Follows the form-based pattern with selection sub-states. The user reviews candidate matches and submits their choice. See the patterns page for the shared lifecycle.
Tag
<incode-identity-reuse> is a standard Web Component. Importing the UI subpath registers the custom element; importing the CSS applies the module's styles.
import '@incodetech/web/identity-reuse';
import '@incodetech/web/identity-reuse/styles.css';Properties
| Property | Type | Required | Description |
|---|---|---|---|
config | IdentityReuseConfig | ❌ | No options |
onFinish | () => void | ❌ | Called when the user's choice is submitted |
onError | (error: string) => void | ❌ | Called when an error occurs |
Configuration
The module takes no configuration:
type IdentityReuseConfig = {};Candidate sources (which prior identities are considered) are configured server-side.
State machine
IdentityReuseState is a discriminated union over status. The selection states (oneCandidateFound, multiCandidatesFound, noCandidatesFound) are unique to this module:
| Status | Description |
|---|---|
idle | Initial state. |
loading | Fetching candidate matches from the backend. |
oneCandidateFound | Single match found. User confirms or rejects. |
multiCandidatesFound | Multiple matches; user picks one (or skips). |
noCandidatesFound | No matches; user proceeds with a fresh verification. |
submitContinue | User chose to reuse a candidate; submitting the choice. |
submitSkip | User chose to skip reuse; submitting the skip. |
finished | Terminal. |
error | Fatal error. |
The candidate states expose currentOrganizationName and candidateOrganizationNames from the backend response.
API methods
| Method | Purpose |
|---|---|
load() | Fetch candidate matches. |
startSelection() | Begin selecting from multiCandidatesFound. |
chooseCandidate(organizationName) | Pick a candidate by organization name. |
changeCandidate() | Go back to selection from submitContinue (before submit). |
submitCandidate() | Submit the chosen candidate (reuse). |
skip() | Skip reuse and proceed with fresh verification. |
retry() | After error, restart. |
Plus the universal lifecycle: subscribe, getState, reset, stop.
See also
- Module: Selfie: fallback when reuse is skipped or no candidates found
- Module: Authentication: different re-auth flow (selfie ↔ stored biometric)
- Module Patterns → form-based
- Individual Modules
Updated 21 days ago
