Skip to content

Commit

Permalink
Merge pull request #403 from onfido/release/30.6.0
Browse files Browse the repository at this point in the history
Release 30.6.0
  • Loading branch information
VinceOnfido authored Sep 9, 2024
2 parents 780b006 + 6fbfc13 commit 68d0499
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),


Expand Down
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: "<WORKFLOW_RUN_ID>", sdkToken: "<YOUR_SDK_TOKEN>")
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)
Expand Down
2 changes: 1 addition & 1 deletion SampleApp/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SampleAppObjC/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 68d0499

Please sign in to comment.