Skip to content

Releases: getyoti/yoti-node-sdk

v4.12.2

02 Dec 14:18

Choose a tag to compare

Maintenance only

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

v4.12.1

11 Nov 16:13

Choose a tag to compare

Fixes

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

v4.12.0

05 Nov 10:12

Choose a tag to compare

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

23 Jul 15:05

Choose a tag to compare

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

23 May 15:26

Choose a tag to compare

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

12 Mar 15:43

Choose a tag to compare

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

v4.10.0

17 Oct 15:53

Choose a tag to compare

NEW

Identity Verification service

Given a session, one can now request the devices that interacted with the session using the method getSessionTrackedDevices(sessionId). The devices resources can also be deleted, using deleteSessionTrackedDevices(sessionId).

Example
const sessionId = 'session-xxx';

// Getting the device events
const devicesResponse = await idvClient.getSessionTrackedDevices(sessionId);
const events = devicesResponse.getDeviceEvents()
const firstEvent = events[0]

firstEvent.getEvent();  // string: CONFIG_FIRST_LOADED, RESOURCE_CREATED...
firstEvent.getCreated();  // Date

const firstEventDevice = firstEvent.getDevice();   // Device

firstEventDevice.getIpAddress();  // string | undefined
firstEventDevice.getIpISOCountryCode()  // string | undefined
firstEventDevice.getManufactureName()  // string | undefined
firstEventDevice.getModelName()  // string | undefined
firstEventDevice.getOSName()  // string | undefined
firstEventDevice.getOSVersion()  // string | undefined
firstEventDevice.getBrowserName()  // string | undefined
firstEventDevice.getBrowserVersion()  // string | undefined
firstEventDevice.getLocale()  // string | undefined
firstEventDevice.getClientVersion()  // string


// Deleting the device events
await idvClient.deleteSessionTrackedDevices(sessionId);

v4.9.0

09 Aug 08:57

Choose a tag to compare

NEW

Identity Verification service

When configuring a session, one can now specify the brand identifier for the IDV client, via the SdkConfigBuilder new method withBrandId(string).

Example
const {
  SdkConfigBuilder,
} = require('yoti');

// Using the SessionSpecificationBuilder
const sdkConfig = new SdkConfigBuilder()
  .withAllowsCameraAndUpload()
  // .... more options
  .withBrandId('some-brand-identifier')  // NEW
  .build();

v4.8.0

25 Jun 13:33

Choose a tag to compare

NEW

Advanced Identity Profile in Identity Verification service

The SDK now exposes the Advanced Identity Profile supported in the Identity Verification service. It helps with creating a session with Advanced Identity Profile requirements, and supports the response parsing.

Example to create a session
const {
  // ...
  SessionSpecificationBuilder,
  AdvancedIdentityProfileBuilder,
  AdvancedIdentityProfileRequirementsBuilder,
  AdvancedIdentityProfileSchemeBuilder,
} = require('yoti');

// Using the SessionSpecificationBuilder
const sessionSpecificationBuilder = new SessionSpecificationBuilder();

const advancedIdentityProfileSchemeDBS = new AdvancedIdentityProfileSchemeBuilder()
  .withType('DBS')
  .withObjective('BASIC')
  .withLabel('label-for-DBS-BASIC')
  .build();

const advancedIdentityProfileSchemeRTW = new AdvancedIdentityProfileSchemeBuilder()
  .withType('RTW')
  .withLabel('label-for-RTW')
  .build();

const advancedIdentityProfileUKTFIDA = new AdvancedIdentityProfileBuilder()
  .withTrustFramework('UK_TFIDA')
  .withScheme(advancedIdentityProfileSchemeDBS)
  .withScheme(advancedIdentityProfileSchemeRTW)
  .build();

const advancedIdentityProfileSchemeAL1 = new AdvancedIdentityProfileSchemeBuilder()
  .withType('IDENTITY')
  .withObjective('AL_L1')
  .withLabel('label-for-IDENTITY-AL-L1')
  .build();

const advancedIdentityProfileYotiGlobal = new AdvancedIdentityProfileBuilder()
  .withTrustFramework('YOTI_GLOBAL')
  .withScheme(advancedIdentityProfileSchemeAL1)
  .build();

const advancedIdentityProfileRequirements = new AdvancedIdentityProfileRequirementsBuilder()
  .withProfile(advancedIdentityProfileUKTFIDA)
  .withProfile(advancedIdentityProfileYotiGlobal)
  .build();

sessionSpecificationBuilder.withAdvancedIdentityProfileRequirements(advancedIdentityProfileRequirements);
Example to retrieve a session
const sessionResult = await idvClient.getSession(sessionId);

const advancedIdentityProfile = sessionResult.getAdvancedIdentityProfile();
// advancedIdentityProfile.getSubjectId(); // same a simple Identity Profile
// advancedIdentityProfile.getResult(); // same a simple Identity Profile
// advancedIdentityProfile.getFailureReason() // same a simple Identity Profile (see update below)

const report = advancedIdentityProfile.getIdentityProfileReport();
const compliance = report.getCompliance();
// report.getMedia();

// Given one of the compliance - corresponds to the required profiles
const trustFrameworkCompliance = compliance[0];
// trustFrameworkCompliance.getTrustFramework();
const schemesCompliance = trustFrameworkCompliance.getSchemesCompliance();

// Given one of the scheme compliance
const schemeCompliance = schemesCompliance[0];
schemeCompliance.getRequirementsMet();
schemeCompliance.getScheme();
schemeCompliance.getRequirementsNotMetInfo();

Minor updates

Update of type for the error details surfaced in Identity Verification service

The 'requirements not met details' within the IdentityProfileRequirementsNotMetDetailResponse are now parsed as a class.

const sessionResult = await idvClient.getSession(sessionId);
const identityProfile = sessionResult.getIdentityProfile(); // or sessionResult.getAdvancedIdentityProfile();
if (identityProfile) {
  const failureReason = identityProfile.getFailureReason();

  if (failureReason) {
    const reasonCode = failureReason.getReasonCode(); // string
     // Array of IdentityProfileRequirementsNotMetDetailResponse (NEW - class based)
    const requirementsNotMetDetails = failureReason.getRequirementsNotMetDetails();
    /*
    IdentityProfileRequirementsNotMetDetailResponse shape as follows:
    {
      failureType, //string
      documentType, //string
      documentCountryIsoCode, //string
      auditId, //string
      details, //string
    }

    // Getters (NEW):
    .getFailureType() 
    .getDocumentType() {
    .getDocumentCountryIsoCode() {
    .getAuditId() {
    .getDetails() {
    */
  }
}

v4.7.0

15 May 06:46
7e3dbd7

Choose a tag to compare

New

Surface error details in Profile and Digital Identity services

Surface errorReason for identity profile receipt/activity.

Usage

Share v1 - via Profile service

Given the share is complete and token received:

const activityDetails = await yotiClient.getActivityDetails(token);
const outcome = activityDetails.getOutcome();
const errorDetails = activityDetails.getErrorDetails();

/*
Description of errorDetails:
- errorCode: string, ie 'FRAUD_DETECTED', 'MANDATORY_DOCUMENT_NOT_PROVIDED'...
- description: string
- errorReason: optional object with 'requirementsNotMetDetails' field

errorReason: {
  requirementsNotMetDetails: [
    {
      failureType, //string
      documentType, //string
      documentCountryIsoCode, //string
      auditId, //string
      details, //string
    },
    ...
  ]
}
*/
Share v2 - via Digital Identity service

Given the share is complete (assuming the receiptId was retrieved):

const receipt = await sdkDigitalIdentityClient.getShareReceipt(receiptId);
const receiptError = receipt.getError();
if(receiptError) {
  const receiptErrorReason = receipt.getErrorReason();
  /*
  If defined, object of shape:
  {
    requirementsNotMetDetails: [
      {
        failureType, //string
        documentType, //string
        documentCountryIsoCode, //string
        auditId, //string
        details, //string
      },
      ...
    ]
  }
  */  
}

Surface error details in Identity Verification service

Surface the 'requirements not met details' within the IdentityProfile FailureReasonResponse.

Usage

Given a session (with identity profile requirement) is completed and retrieved:

const sessionResult = await idvClient.getSession(sessionId);
const identityProfile = sessionResult.getIdentityProfile();
if (identityProfile) {
  const failureReason = identityProfile.getFailureReason();

  if (failureReason) {
    const reasonCode = failureReason.getReasonCode(); // string
    const requirementsNotMetDetails = failureReason.getRequirementsNotMetDetails(); // Array of RequirementsNotMetDetail
    /*
    RequirementsNotMetDetail shape as follows:
    {
      failureType, //string
      documentType, //string
      documentCountryIsoCode, //string
      auditId, //string
      details, //string
    }
    */
  }
}