Yoti 3.2.0

Yoti .NET SDK, providing Yoti API support for Login, Verify (2FA) and Age Verification

Install-Package Yoti -Version 3.2.0
dotnet add package Yoti --version 3.2.0
<PackageReference Include="Yoti" Version="3.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Yoti --version 3.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Yoti .NET SDK

Welcome to the Yoti .NET SDK. This repo contains the tools and step by step instructions you need to quickly integrate your .NET back-end with Yoti so that your users can share their identity details with your application in a secure and trusted way.

Table of Contents

  1. An Architectural View -
    High level overview of integration

  2. Enabling the SDK -
    How to install our SDK

  3. Client Initialisation -
    Description on setting up your SDK

  4. Profile Retrieval -
    Description on setting up profile

  5. Handling Users -
    Description on handling user log on's

  6. API Coverage -
    Attributes defined

  7. Support -
    Please feel free to reach out

An Architectural View

To integrate your application with Yoti, your back-end must expose a GET endpoint that Yoti will use to forward tokens.
The endpoint can be configured in Yoti Hub when you create/update your application.

The image below shows how your application back-end and Yoti integrate in the context of a Login flow.
Yoti SDK carries out for you steps 6, 7 ,8 and the profile decryption in step 9.

![alt text](login_flow.png "Login flow")

Yoti also allows you to enable user details verification from your mobile app by means of the Android (TBA) and iOS (TBA) SDKs. In that scenario, your Yoti-enabled mobile app is playing both the role of the browser and the Yoti app. By the way, your back-end doesn't need to handle these cases in a significantly different way. You might just decide to handle the User-Agent header in order to provide different responses for web and mobile clients.

Enabling the SDK

To install the Yoti NuGet package you will need to install NuGet. You can find instructions to do that here

To import the latest Yoti SDK into your project, enter the following command from NuGet Package Manager Console in Visual Studio:

Install-Package Yoti

For other installation methods, see nuget.org/packages/Yoti

Client Initialisation

The YotiClient is the SDK entry point. To initialise it you need include the following snippet inside your endpoint initialisation section:

const string sdkId = "your-sdk-id";
var privateKeyStream = System.IO.File.OpenText("path/to/your-application-pem-file.pem");
var yotiClient = new YotiClient(sdkId, privateKeyStream);

Where:

  • sdkId is the sdk identifier generated by Yoti Hub when you create (and then publish) your app. Note this is not your Application Identifier which is needed by your clientside code
  • path/to/your-application-pem-file.pem - When you create your app on Yoti Hub, your browser generates a .pem file. This is the path to that file.

You'll need to add the correct callback URL to one of the scenarios of your application from the "Applications" sections on Yoti Hub. You also need to make sure that the value of the data-yoti-scenario-id attribute in the Yoti button matches the id in the selected scenario.

Profile Retrieval

When your application receives a one time use token via the exposed endpoint (it will be assigned to a query string parameter named token), you can easily retrieve the user profile by adding the following to your endpoint handler:

var activityDetails = yotiClient.GetActivityDetails(oneTimeUseToken);

Or if you are in an asynchronous method:

var activityDetails = await yotiClient.GetActivityDetailsAsync(oneTimeUseToken);

Handling Users

The ActivityDetails includes a unique identifier for the user, named RememberMeId. You can use this to identify users returning to your application, but if the user completes a share with a different application, Yoti will assign a different RememberMeId.
Applications registered to an organisation may also utilise an additional unique identifier named ParentRememberMeId. Use this to identify users returning to your organisation. It is consistent for a given user in all applications registered to a single organisation.

API Coverage

  • Activity Details
    • [X] RememberMeId RememberMeId
    • [X] ParentRememberMeId ParentRememberMeId
    • [X] Timestamp Timestamp
    • [X] Receipt ID ReceiptId
    • [X] Profile Profile
      • [X] Selfie Selfie
      • [X] Selfie URI Selfie.GetBase64URI()
      • [X] Given Names GivenNames
      • [X] Family Name FamilyName
      • [X] Full Name FullName
      • [X] Mobile Number MobileNumber
      • [X] Email Address EmailAddress
      • [X] Age / Date of Birth DateOfBirth
      • [X] Postal Address Address
      • [X] Structured Postal Address StructuredPostalAddress
      • [X] Gender Gender
      • [X] Nationality Nationality
      • [X] Document Details DocumentDetails
      • [X] Document Images DocumentImages
      • [X] Age Verifications AgeVerifications
    • [X] ApplicationProfile ApplicationProfile
      • [X] Name Name
      • [X] URL URL
      • [X] Logo Logo
      • [X] Receipt Background Color ReceiptBackgroundColor

Support

For any questions or support please email sdksupport@yoti.com.
Please provide the following to get you up and working as quickly as possible:

  • Computer type
  • OS version
  • Version of .NET being used
  • Screenshot

Once we have answered your question we may contact you again to discuss Yoti products and services. If you’d prefer us not to do this, please let us know when you e-mail.

For further documentation, see <https://developers.yoti.com/yoti-app/web-integration>

Yoti .NET SDK

Welcome to the Yoti .NET SDK. This repo contains the tools and step by step instructions you need to quickly integrate your .NET back-end with Yoti so that your users can share their identity details with your application in a secure and trusted way.

Table of Contents

  1. An Architectural View -
    High level overview of integration

  2. Enabling the SDK -
    How to install our SDK

  3. Client Initialisation -
    Description on setting up your SDK

  4. Profile Retrieval -
    Description on setting up profile

  5. Handling Users -
    Description on handling user log on's

  6. API Coverage -
    Attributes defined

  7. Support -
    Please feel free to reach out

An Architectural View

To integrate your application with Yoti, your back-end must expose a GET endpoint that Yoti will use to forward tokens.
The endpoint can be configured in Yoti Hub when you create/update your application.

The image below shows how your application back-end and Yoti integrate in the context of a Login flow.
Yoti SDK carries out for you steps 6, 7 ,8 and the profile decryption in step 9.

![alt text](login_flow.png "Login flow")

Yoti also allows you to enable user details verification from your mobile app by means of the Android (TBA) and iOS (TBA) SDKs. In that scenario, your Yoti-enabled mobile app is playing both the role of the browser and the Yoti app. By the way, your back-end doesn't need to handle these cases in a significantly different way. You might just decide to handle the User-Agent header in order to provide different responses for web and mobile clients.

Enabling the SDK

To install the Yoti NuGet package you will need to install NuGet. You can find instructions to do that here

To import the latest Yoti SDK into your project, enter the following command from NuGet Package Manager Console in Visual Studio:

Install-Package Yoti

For other installation methods, see nuget.org/packages/Yoti

Client Initialisation

The YotiClient is the SDK entry point. To initialise it you need include the following snippet inside your endpoint initialisation section:

const string sdkId = "your-sdk-id";
var privateKeyStream = System.IO.File.OpenText("path/to/your-application-pem-file.pem");
var yotiClient = new YotiClient(sdkId, privateKeyStream);

Where:

  • sdkId is the sdk identifier generated by Yoti Hub when you create (and then publish) your app. Note this is not your Application Identifier which is needed by your clientside code
  • path/to/your-application-pem-file.pem - When you create your app on Yoti Hub, your browser generates a .pem file. This is the path to that file.

You'll need to add the correct callback URL to one of the scenarios of your application from the "Applications" sections on Yoti Hub. You also need to make sure that the value of the data-yoti-scenario-id attribute in the Yoti button matches the id in the selected scenario.

Profile Retrieval

When your application receives a one time use token via the exposed endpoint (it will be assigned to a query string parameter named token), you can easily retrieve the user profile by adding the following to your endpoint handler:

var activityDetails = yotiClient.GetActivityDetails(oneTimeUseToken);

Or if you are in an asynchronous method:

var activityDetails = await yotiClient.GetActivityDetailsAsync(oneTimeUseToken);

Handling Users

The ActivityDetails includes a unique identifier for the user, named RememberMeId. You can use this to identify users returning to your application, but if the user completes a share with a different application, Yoti will assign a different RememberMeId.
Applications registered to an organisation may also utilise an additional unique identifier named ParentRememberMeId. Use this to identify users returning to your organisation. It is consistent for a given user in all applications registered to a single organisation.

API Coverage

  • Activity Details
    • [X] RememberMeId RememberMeId
    • [X] ParentRememberMeId ParentRememberMeId
    • [X] Timestamp Timestamp
    • [X] Receipt ID ReceiptId
    • [X] Profile Profile
      • [X] Selfie Selfie
      • [X] Selfie URI Selfie.GetBase64URI()
      • [X] Given Names GivenNames
      • [X] Family Name FamilyName
      • [X] Full Name FullName
      • [X] Mobile Number MobileNumber
      • [X] Email Address EmailAddress
      • [X] Age / Date of Birth DateOfBirth
      • [X] Postal Address Address
      • [X] Structured Postal Address StructuredPostalAddress
      • [X] Gender Gender
      • [X] Nationality Nationality
      • [X] Document Details DocumentDetails
      • [X] Document Images DocumentImages
      • [X] Age Verifications AgeVerifications
    • [X] ApplicationProfile ApplicationProfile
      • [X] Name Name
      • [X] URL URL
      • [X] Logo Logo
      • [X] Receipt Background Color ReceiptBackgroundColor

Support

For any questions or support please email sdksupport@yoti.com.
Please provide the following to get you up and working as quickly as possible:

  • Computer type
  • OS version
  • Version of .NET being used
  • Screenshot

Once we have answered your question we may contact you again to discuss Yoti products and services. If you’d prefer us not to do this, please let us know when you e-mail.

For further documentation, see <https://developers.yoti.com/yoti-app/web-integration>

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.2.0 69 12/4/2019
3.1.0 82 10/23/2019
3.0.0 45 10/9/2019
2.8.0 374 10/30/2018
2.7.0 360 7/12/2018
2.6.0 296 6/6/2018
2.4.0 288 3/22/2018
2.3.0 219 3/13/2018
2.2.1 221 2/21/2018
2.2.0 275 10/23/2017
2.1.1 264 10/12/2017
2.1.0 294 10/3/2017