Redirect to Mobile 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 Redirect to Mobile module bridges desktop-initiated verifications to mobile devices: it generates a QR code (and optional SMS link) that hands the user off to their phone, where camera-bearing modules (selfie, ID capture) continue. Used when desktop browsers can't deliver the verification experience the customer needs.
Combines composite / orchestrator and backend-process traits — fetches the redirect URL, polls onboarding status, and emits
finishedonce the mobile device completes the flow.
Tag
<incode-redirect-to-mobile> is a standard Web Component. Importing the UI subpath registers the custom element; importing the CSS applies the module's styles.
import '@incodetech/web/redirect-to-mobile';
import '@incodetech/web/redirect-to-mobile/styles.css';Properties
| Property | Type | Required | Description |
|---|---|---|---|
config | RedirectToMobileConfig | ❌ | Configuration options |
onFinish | () => void | ❌ | Called when the mobile flow completes |
onError | (error: string) => void | ❌ | Called when an error occurs |
Configuration
type RedirectToMobileConfig = {
flowId?: string;
url?: string;
disableSmsOption?: boolean;
addContinueToDesktop?: boolean;
qrPhishingResistance?: boolean;
authHint?: string;
externalId?: string;
lang?: string;
};| Option | Type | Required | Description |
|---|---|---|---|
flowId | string | ❌ | Session flow ID; injected by the orchestrator. |
url | string | ❌ | Pre-computed redirect URL. When omitted, the module fetches one from the backend. |
disableSmsOption | boolean | ❌ | Hide the SMS-link option (QR only). |
addContinueToDesktop | boolean | ❌ | Show a "Continue on desktop" affordance for users who'd rather not switch. |
qrPhishingResistance | boolean | ❌ | Enable the QR anti-phishing handshake (rotates urlUuid on mount; validates on the mobile leg). |
authHint | string | ❌ | QR/auth hint for the mobile leg. |
externalId | string | ❌ | Forwarded to the new mobile session. |
lang | string | ❌ | Forwarded language code. |
State machine
RedirectToMobileState is a discriminated union over status:
| Status | Description |
|---|---|
idle | Initial state. |
loading | Fetching the redirect URL (or warming the QR). |
redirecting | QR / SMS option visible; polling onboarding status. User completes flow on mobile. |
finished | Mobile flow completed (status moved to ONBOARDING_FINISHED). |
closed | User dismissed. |
error | Fatal error. |
Behind the scenes the module polls onboarding status (ONBOARDING_NOT_STARTED → ONBOARDING_IN_PROGRESS → ONBOARDING_FINISHED) and surfaces only the user-relevant transitions.
See also
- Session Management: how the desktop and mobile legs share a session token
- Module Patterns → composite
- Individual Modules
Updated 22 days ago
