Skip to content

Releases: getyoti/yoti-node-sdk

v4.14.0

Choose a tag to compare

@laurent-yoti laurent-yoti released this 31 Jul 13:13

NEW

IDV support for Digital ID

When creating an IDV session, one can specify that Digital ID are accepted as ID Documents, and can also specify which providers are allowed.
Using either the DocumentRestrictionsFilterBuilder or OrthogonalRestrictionsFilterBuilder, configure the required document like:

const documentRestrictionsFilter = new DocumentRestrictionsFilterBuilder()
  .withDocumentRestriction((new DocumentRestrictionBuilder())
    .withDocumentTypes(['DIGITAL_AADHAAR'])
    .build())
  .forWhitelist()
  .withAllowDigitalIds(true)
  .withAllowedProviders([
    new AllowedProviderBuilder().withName('DIGILOCKER').build(),
  ])
  .build();

const orthogonalRestrictionsFilter = new OrthogonalRestrictionsFilterBuilder()
  .withAllowDigitalIds(true)
  .withAllowedProviders([
    new AllowedProviderBuilder().withName('DIGILOCKER').build(),
  ])
  .build();

const requiredDocument = new RequiredIdDocumentBuilder()
  .withFilter(documentRestrictionsFilter)
  // or .withFilter(orthogonalRestrictionsFilter)
  .build()

// On the session specification builder, add the document
const sessionSpec = new SessionSpecificationBuilder()
  .withRequiredDocument(requiredDocument)
  // .with... other requirements/options for the session
  .build()

When retrieving a session, for any ID Document based on a Digital ID, the provider is available via the idDocumentResource.getProvider() method.
Additionally, if a session uses any Digital ID shares, the list of the share is available via the session.getDigitalIdShares() method.

REMOVED

The old aml API is now removed as no longer available from Yoti.

v4.13.2

Choose a tag to compare

@laurent-yoti laurent-yoti released this 15 May 10:28
6b4da46

Dependencies updates

Update "protobufjs" 8.0.1 => 8.2.1
Update "husky" 9.0.11 => 9.1.7

v4.13.1

Choose a tag to compare

@laurent-yoti laurent-yoti released this 06 May 14:06
4d8438f

NEW

In the IDV package

Introduces new method getExtractionImageIds() in the PageResponse class.

Example:

const sessionId = 'some_session_id';
const sessionResult = await idvClient.getSession(sessionId);
const firstIdDocument = sessionResult.getResources().getIdDocuments()[0];
const firstPage = firstIdDocument.getPages()[0];
// new method usage
firstPage.getExtractionImageIds(); // ['image_id_1', 'image_id_2']

Others

Chores - updates for vulnerable libraries versions.
Upgrade to eslint-9

v4.13.0

Choose a tag to compare

@laurent-yoti laurent-yoti released this 27 Mar 08:26

NEW

RTW Share-code in ID Verification

Create a session with Advanced Identity Profile

To enable the RTW Share Code - which acts as a fallback when documents provided are not RTW compatible, include an AdvancedIdentityProfileScheme with type GBR_RTW_SHARECODE in the AdvancedIdentityProfile of type YOTI_GLOBAL when defining the AdvancedIdentityProfileRequirements.

// Create RTW scheme
const advancedIdentityProfileSchemeRTW = new AdvancedIdentityProfileSchemeBuilder()
  .withType('RTW')
  .withLabel('label-for-RTW')
  .build();
// Setup advanced identity profile, with the RTW scheme for the UK_TFIDA framework
const advancedIdentityProfileUKTFIDA = new AdvancedIdentityProfileBuilder()
  .withTrustFramework('UK_TFIDA')
  .withScheme(advancedIdentityProfileSchemeRTW)
  .build();

// NEW - Setup advanced identity profile, with the GBR_RTW_SHARECODE scheme
const advancedIdentityProfileSchemeGbrRtwSharecode = new AdvancedIdentityProfileSchemeBuilder()
  .withType('GBR_RTW_SHARECODE')
  .withLabel('label-for-GBR-RTW-SHARECODE')
  .build();
// Setup advanced identity profile, with the GBR_RTW_SHARECODE scheme for the YOTI_GLOBAL framework
const advancedIdentityProfileYotiGlobal = new AdvancedIdentityProfileBuilder()
  .withTrustFramework('YOTI_GLOBAL')
  .withScheme(advancedIdentityProfileSchemeGbrRtwSharecode)
  .build();

// Finally assemble an advanced identity profile requirements, using the two profiles
const advancedIdentityProfileRequirements = new AdvancedIdentityProfileRequirementsBuilder()
  .withProfile(advancedIdentityProfileUKTFIDA)
  .withProfile(advancedIdentityProfileYotiGlobal)
  .build();

Retrieve session

Given a session is retrieved, there can be multiple share code resources (as per the user attempts) but only one is successful (eg, include collected details):

    const sessionResult = await idvClient.getSession(sessionId);
    const shareCodeResources = sessionResult.getResources().getShareCodeResources();
    const firstShareCodeResource = shareCodeResources[0];

    // Submitted details (share-code and date of birth)
    const lookupProfileMedia = firstShareCodeResource.getLookupProfile().getMedia();
    // Collected details (full-name and RTW expiration date)
    const returnedProfileMedia = firstShareCodeResource.getReturnedProfile().getMedia();
    // Collected PDF file media
    const pdfFileMedia = firstShareCodeResource.getFile().getMedia();
    // Collected ID Photo media
    const idPhotoMedia = firstShareCodeResource.getIdPhoto().getMedia();

v4.12.2

Choose a tag to compare

@laurent-yoti laurent-yoti released this 02 Dec 14:18

Maintenance only

  • node-forge: 1.3.2
  • body-parser: 1.20.4 (examples)

v4.12.1

Choose a tag to compare

@laurent-yoti laurent-yoti released this 11 Nov 16:13

Fixes

In the IDV service, when retrieving the device events, the clientVersion is now optional.

v4.12.0

Choose a tag to compare

@laurent-yoti laurent-yoti released this 05 Nov 10:12

NEW

IDV session configuration suppressed_screens

    .withSdkConfig(
      new SdkConfigBuilder()
        .withLocale('en-GB')
        // ...more options
        // [NEW] option to set which screens should be suppressed
        .withSuppressedScreens([
          'ID_DOCUMENT_EDUCATION',
          'ID_DOCUMENT_REQUIREMENTS',
        ])
        .build()
    )

IDV session result breakdown item now includes process

      const session = await getSession('some-id');
      const [firstAuthenticityCheck] = session.getAuthenticityChecks()
      const report = firstAuthenticityCheck.getReport();
      const [firstBreakdownItem] = report.getBreakdown();
      // [NEW] method to get the process
      const process = firstBreakdownItem.getProcess();
      console.log(process); // 'AUTOMATED' or 'EXPERT_REVIEW'

v4.11.1

Choose a tag to compare

@laurent-yoti laurent-yoti released this 23 Jul 15:05

Vulnerability fixes

On package

Bump form-data from 4.0.2 to 4.0.4
GHSA-fjxv-7rqg-78g4

Bump on @babel/helpers
GHSA-968p-4wvh-cqc8

Bump on brace-expansion
GHSA-v6h2-p8h4-qcjw

On examples

Bump on-headers and express-session in /examples/idv-identity-checks

v4.11.0

Choose a tag to compare

@laurent-yoti laurent-yoti released this 23 May 15:26

NEW

Can now set for dynamic_sharing_service policy with attributes that have alternative names, or that are optional:

    const wantedAttribute = new WantedAttributeBuilder()
      .withName("common_name")
      .withAlternativeName("alt-name-1")
      .build()

or

    const wantedAttribute = new WantedAttributeBuilder()
      .withName("common_name")
      .withAlternativeNames(["alt-name-1", "alt-name-2"])
      .build()

and

    const wantedAttribute = new WantedAttributeBuilder()
      .withName("some_attribute_name")
      .withOptional(true)
      .build()

FIXES

  • AgeVerification parsing to support names like of age_over:20:5
  • Typing of the getMedia() to possibly return null

v4.10.1

Choose a tag to compare

@laurent-yoti laurent-yoti released this 12 Mar 15:43

New

Digital Identity service

Added to WantedAttribute the "optional" option as well as "alternativeName"

Fixes

Identity Verification service

Validation of AdvancedIdentityProfileResponse - the field subject_id is now optional
Validation of IdentityProfileRequirementsNotMetDetailResponse - the field details is now optional