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
|
Creates a verification session against the API. |
|
Orchestrates: track → create session → open modal → track outcome. |
|
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 |
|
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 |
|---|---|
|
|
|
|
|
|
|
|