Entrust Identity

Entrust provides identity verification sessions; the capture experience itself is the Onfido web SDK (onfido-sdk-ui), rendered inside an application modal.

Services

EntrustIdentityService

Creates a verification session against the API.

EntrustIdentityLauncherService

Orchestrates: track → create session → open modal → track outcome.

EntrustVerificationModalComponent

Hosts the Onfido SDK.

Launching a verification

launch(supplierKey: string): Observable<EntrustVerificationResult> {
    this.eventLogger.track({ eventMessage: IdentityVerificationEventType.VerificationStarted });

    return this.entrustIdentityService.createSession(supplierKey).pipe(
        catchError(() => {
            this.eventLogger.track({ eventMessage: IdentityVerificationEventType.VerificationFailed });
            return of<EntrustSessionResponse>(undefined);          (1)
        }),
        switchMap(session => this.openVerificationModal(session)),
    );
}

private openVerificationModal(session: EntrustSessionResponse): Observable<EntrustVerificationResult> {
    if (!session?.sdk_token || !session?.workflow_run_id) {
        return of(EntrustVerificationResult.Error);                (2)
    }

    return this.dialog.open(EntrustVerificationModalComponent, {
        data: { sdkToken: session.sdk_token, workflowRunId: session.workflow_run_id },
        width: '640px',
        maxWidth: '95vw',
    }).afterClosed().pipe(
        take(1),
        tap(result => {
            if (result === EntrustVerificationResult.Completed) {
                this.eventLogger.track({ eventMessage: IdentityVerificationEventType.VerificationCompleted });
            }
        }),
    );
}
1 A failed session creation is swallowed into undefined after tracking, so the stream continues rather than erroring.
2 Which then falls through to EntrustVerificationResult.Error — the caller always receives a result, never an error notification.

A session is only usable when it carries both sdk_token and workflow_run_id.

Session shape

// core/pyb/interfaces/entrust-identity.interface.ts
interface EntrustSessionResponse {
    sdk_token: string;        // Onfido SDK token
    workflow_run_id: string;  // Entrust workflow run
}

Results

EntrustVerificationResult — Completed or Error (plus whatever the modal returns on dismissal). Only Completed emits the completion event.

Entry points

Seller Card transition

SellerCardTransitionModalComponent launches Entrust on accept when the identity document has expired. See Seller Card.

Manage Account

Identity re-verification from the ID section.

The Seller Card path is the important one:

this.store.pipe(select(selectCurrentUser), take(1)).subscribe(user => {
    if (user?.id) { this.entrustLauncher.launch(user.id).subscribe(); }
});

An expired identity document blocks card migration, so accepting the transition dialog immediately starts re-verification.

Analytics

Constant Segment event

IdentityVerificationEventType.VerificationStarted

IdentityVerificationStarted

IdentityVerificationEventType.VerificationCompleted

IdentityVerificationCompleted

IdentityVerificationEventType.VerificationFailed

IdentityVerificationFailed

VerificationFailed is only emitted when session creation fails. A supplier who opens the modal and abandons it, or whose document is rejected by Onfido, produces VerificationStarted with no terminal event. Funnel analysis must account for that gap.

First-time ID upload

Distinct from Entrust re-verification: /manage-account/your-information/upload-id (UploadIdModule + UploadIdService) takes a direct document upload using image-upload / image-preview and FileHelperService. Entrust is for re-verification of an expired or rejected document.