Note
This guide is specific to Web SDK 2.0. If you are still using 1.x, you can find documentation here. Contact your Incode Representative for upgrade information and check if you are a candidate for this upgrade.
Full rollout to all clients still TBD.
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). |
continue |
The user chose to stay on desktop instead of switching devices. Terminal, and deliberately separate from closed and error. |
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.
continue exists so you can wire "keep going on desktop" to its own handler. Treat it as a deliberate user choice, not a dismissal or a failure. It appears only when addContinueToDesktop is enabled.
API methods
Beyond the shared composite / orchestrator set:
| Method | Purpose | Callable when |
|---|---|---|
sendSms(phone) |
Text the handoff link to that number. | redirecting |
resetSms() |
Clear the SMS state so the user can re-enter their number. | redirecting, after a send |
continueOnDesktop() |
Skip the handoff and continue here. Advances to continue. |
redirecting, when addContinueToDesktop is enabled |
retry() |
Retry after a failed URL fetch or send. | error |
See also
- Session Management: how the desktop and mobile legs share a session token
- Module Patterns → composite
- Individual Modules