From 6fbfc13db73df7b8546b0e6060afb3b1e8b59f7e Mon Sep 17 00:00:00 2001 From: "J. Doe (https://devcenter.bitrise.io/builds/setting-your-git-credentials-on-build-machines/)" Date: Fri, 6 Sep 2024 15:17:15 +0000 Subject: [PATCH] changes for 30.6.0 release --- CHANGELOG.md | 6 ++++++ Package.swift | 4 ++-- README.md | 36 +++++++++++++++++++++++++++++++++--- SampleApp/Podfile | 2 +- SampleAppObjC/Podfile | 2 +- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 109bdd3..ac57d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. **Note**: If the strings translations change it will result in a MINOR version change, therefore you are responsible for testing your translated layout in case you are using custom translations. [More on language localisation](README.md#language-customisation) +## [30.6.0] - 2024-08-29 + +### Added + +- Added APIs for encrypted biometric token storage and retrieval + ## [30.5.0] - 2024-08-08 ### Changed diff --git a/Package.swift b/Package.swift index 3464c28..4cecf78 100644 --- a/Package.swift +++ b/Package.swift @@ -17,8 +17,8 @@ let package = Package( .binaryTarget( name: "Onfido", - url: "https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-v30.5.0.zip", - checksum: "0f3daadd08a5f93ea0db59bfdd953b4a3419e7fd32c0109ef0b38da107fa3e8b" + url: "https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-v30.6.0.zip", + checksum: "1e10da73a2dcf05f0bcd1099118b09bdbf79c63b5f33edac7d85e6c8176f7ccf" ), diff --git a/README.md b/README.md index 7b516b7..4eb2bb6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ - [4. Completing a session](#completing-a-session) - [Advanced flow customization](#advanced-flow-customization) - [Advanced callbacks](#advanced-callbacks) -- [User Analytics](#user-analytics) +- [User analytics](#user-analytics) +- [Custom biometric token storage](#custom-biometric-token-storage) - [Migrating](#migrating) - [Security](#security) - [Accessibility](#accessibility) @@ -1621,11 +1622,11 @@ class MediaFile { } ``` -### User Analytics +## User analytics The SDK also allows you to track a user's journey through the Onfido verification process via a definable hook. -#### Overriding the hook +### Overriding the hook In order to expose a user's progress through the SDK, a hook method must be defined while creating the `OnfidoFlow.swift` instance using a `.with(eventHandler: EventHandler)` call. For example: @@ -1688,6 +1689,35 @@ MOTION_FACIAL_UPLOAD_COMPLETED - User's motion capture finished uploading MOTION_FACIAL_CONNECTION_ERROR - User was presented the "Motion connection error" screen during upload ``` +## Custom biometric token storage + +When using the decentralized authentication solution, by default the SDK manages biometric token storage. The SDK also allows you to have control over the token lifecycle by exposing an API to override the default implementation to read and write the token, so it can be stored on-device, in the cloud, in a keychain or on your servers. + +### Implementation + +You need to provide a class that conforms to the `EncryptedBiometricTokenHandler` protocol. Note the `customerUserHash` parameter in both functions that need to be implemented. This is a unique identifier for the user that can be used as a key for token storage. Feel free to ignore it if you have your own identifier. + +Example of a class handling the callbacks for when a token is generated and for when we request a token from you: + +``` +class CustomTokenHandlerClass: EncryptedBiometricTokenHandler { + func onTokenGenerated(customerUserHash: String, encryptedBiometricToken: String) { + // You store `customerUserHash` and `encryptedBiometricToken` however you choose to do so + } + + func onTokenRequested(customerUserHash: String, completion: (String) -> Void) { + // You use the `customerUserHash` to retrieve the encrypted biometric token you have stored and call `completion`, passing in this token + } +} +``` + +Example of initialising a workflow with a class that handles tokens: + +``` +let workflowConfiguration = WorkflowConfiguration(workflowRunId: "", sdkToken: "") +workflowConfiguration.withEncryptedBiometricTokenHandler(handler: self) // `self` to be replaced with a different instance if you are using a different class conforming to `EncryptedBiometricTokenHandler` +``` + ## Migrating You can find the migration guide at [MIGRATION.md](MIGRATION.md) diff --git a/SampleApp/Podfile b/SampleApp/Podfile index 0277235..f790b72 100644 --- a/SampleApp/Podfile +++ b/SampleApp/Podfile @@ -4,7 +4,7 @@ def setup_shared_pods use_frameworks! inhibit_all_warnings! - pod 'Onfido', '30.5.0' + pod 'Onfido', '30.6.0' end target 'SampleApp' do diff --git a/SampleAppObjC/Podfile b/SampleAppObjC/Podfile index c90e932..8ace4b7 100644 --- a/SampleAppObjC/Podfile +++ b/SampleAppObjC/Podfile @@ -4,7 +4,7 @@ def setup_shared_pods use_frameworks! inhibit_all_warnings! - pod 'Onfido', '30.5.0' + pod 'Onfido', '30.6.0' end target 'SampleAppObjC' do