Skip to content

Commit

Permalink
Update for release 13.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and warrenseine committed Jul 11, 2023
1 parent 0db5496 commit c5ca4c7
Show file tree
Hide file tree
Showing 51 changed files with 577 additions and 236 deletions.
7 changes: 7 additions & 0 deletions BASE_32_VERSION_MAPPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,10 @@
| FD | 12.2.3 | 2023-05-24 | |
| FE | 12.3.1 | 2023-05-25 | |
| FF | 12.3.2 | 2023-05-30 | |
| FG | 12.3.3 | 2023-06-01 | |
| FH | 12.3.4 | 2023-06-08 | |
| FI | 12.3.5 | 2023-06-09 | |
| FJ | 12.4.0 | 2023-06-15 | |
| FK | 12.4.0-rc.3 | 2023-06-15 | |
| FL | 12.3.6 | 2023-06-16 | |
| FM | 13.0.0 | 2023-06-29 | |
61 changes: 58 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,61 @@ This project adheres to the Node [default version scheme](https://docs.npmjs.com

### Changed

## [13.0.0] - 2023-07-11

### Changed

- Remove `uploadFallback` option in the `document` step.
- Add a new error when barcode detection issues arise.
- Remove `uploadFallback` option in the `face` step.
- Fix workflow multi document taks step configuration.

## [12.4.0] - 2023-06-19

### Changed

- Add an instructional video in the Face Video intro screen.
- Expose Motion events as [user analytics](https://github.com/onfido/onfido-sdk-ui#tracked-events).

### Fixed

- Fix custom colours on icons
- Fix phone input to prevent country from resetting
- Fix `InvalidStateException` in edge cases where webcams takes too long to initialise.
- Fix icon sizes on intro screens with long texts

## [12.3.6] - 2023-06-16

### Changed

- Deprecate the `tearDown` method. Prefer `safeTearDown`, which is a promise and awaitable.

## [12.3.5] - 2023-06-09

### Fixed

- Public: Fix a crash in the Selfie step when the SDK is bundled

## [12.3.4] - 2023-06-08

### Fixed

- Public: Bump react-webcam to 7.1.1. Really fixes the bug that caused selfies to appear stretched on Safari 15.
- Public: Fix preact version to 10.11.3. This should improve our stability when our library is rebundled (NPM).

## [12.3.3] - 2023-06-01

### Fixed

- Internal: Fix internal issue.

## [12.3.2] - 2023-05-30

### Fixed

- Public: Fix a bug that prevented document upload from the native camera application.
- Public: Fix a bug that caused selfies to appear stretched on Safari 15.

### Changed

## [12.3.1] - 2023-05-25

### Changed
Expand All @@ -33,6 +81,7 @@ This project adheres to the Node [default version scheme](https://docs.npmjs.com
- Public: Remove Auth SDK
- Internal: Enhanced security around payload tampering
- Public: Add capture of ID numbers for Vietnam
- Internal: Auto uppercase postcode to avoid errors

## [10.4.0] - 2023-01-23

Expand Down Expand Up @@ -1490,7 +1539,13 @@ Install with `npm install [email protected]`

- NPM (commonjs2) style of importing the library now works

[next-version]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.2...development
[next-version]: https://github.com/onfido/onfido-sdk-ui/compare/13.0.0...development
[13.0.0]: https://github.com/onfido/onfido-sdk-ui/compare/12.4.0...13.0.0
[12.4.0]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.6...12.4.0
[12.3.6]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.5...12.3.6
[12.3.5]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.4...12.3.5
[12.3.4]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.3...12.3.4
[12.3.3]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.2...12.3.3
[12.3.2]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.1...12.3.2
[12.3.1]: https://github.com/onfido/onfido-sdk-ui/compare/12.3.0...12.3.1
[12.3.0]: https://github.com/onfido/onfido-sdk-ui/compare/10.4.0...12.3.0
Expand Down
6 changes: 6 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The guides below are provided to ease the transition of existing applications us

## `next`

The `uploadFallback` option has been removed. Users with mobile devices that do not have a camera or lack camera browser support will not be able to complete the flow. Please reach out to your CSM for details.

`tearDown` is deprecated in favor of `safeTearDown` which is a promise that you can await to know when the sdk tear down is complete.

For all supported language the copy for the following string(s) has been added:

## Added strings
Expand Down Expand Up @@ -118,6 +122,8 @@ For all supported language the copy for the following string(s) has been added:
- `profile_data::field_validation::tur_specific::invalid_national_id_value`
- `profile_data::field_validation::tur_specific::required_national_id_value`
- `profile_data::national_id_number_title`
- `cross_device::button_primary_upload`
- `cross_device_intro::subtitle_upload`

## `11.0.0`

Expand Down
42 changes: 36 additions & 6 deletions ONFIDO_STUDIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,29 @@ The [response](https://documentation.onfido.com/#workflow-run-object) will conta

You can either:

- use our CDN
- import directly into your HTML page
- use npm (valid from version 9+)
- use npm

#### 2.1 HTML Script Tag Include
#### 2.1 CDN

You can use hosted versions of the library files from Onfido's CDN.

From SDK 12.3.1 onwards, the version number you subscribe to can vary, depending on your needs:

- subscribing to a specific patch release (e.g. v12.3.1) will fix the library files to that SDK release
- subscribing to a minor level release (e.g. v12.3) means Onfido will update to the latest available patch release
- subscribing to a major release (e.g. v12) means Onfido will update to the latest available patch and minor release

```html
<!-- Replace "<version>" with the actual SDK version you want to use, example: v12 -->
<script src="https://sdk.onfido.com/<version>"></script>
<link href="https://sdk.onfido.com/<version>/style.css" rel="stylesheet" />
```

For versions prior to 12.3.1, specifying a precise release only, see our previous [documentation](https://github.com/onfido/onfido-sdk-ui/blob/12.3.0/README.md#43-cdn).

#### 2.2 HTML Script Tag Include

You can include the library as a regular script tag on your page:

Expand All @@ -49,11 +68,11 @@ And the CSS styles:
<link rel="stylesheet" href="dist/style.css" />
```

You can see a simple example using script tags [here](https://jsfiddle.net/gh/get/library/pure/onfido/onfido-sdk-ui/tree/master/demo/fiddle/).
You can see a [simple example using script tags](https://jsfiddle.net/gh/get/library/pure/onfido/onfido-sdk-ui/tree/master/demo/fiddle/).

#### 2.2 NPM style import
#### 2.3 NPM style import

You can import the library as a module into your own JS build system (tested with Webpack):
Alternatively, you can import the library as a module into your own JS build system (tested with Webpack):

```shell
$ npm install --save onfido-sdk-ui
Expand All @@ -71,7 +90,18 @@ The CSS style will be included inline with the JS code when the library is impor

⚠️ Note: The library is **Browser only**, it does not support the **Node Context**.

You can see an example app using npm style import [in our sample app](https://github.com/onfido/onfido-sdk-web-sample-app/).
You can see an [example app using npm style import](https://github.com/onfido/onfido-sdk-web-sample-app/).

#### Split bundle

To decrease the size of your production bundle, you can use the split version of the library:

```javascript
import { init } from 'onfido-sdk-ui/split'
import 'onfido-sdk-ui/split/css'
```

⚠️ Note: The main bundle will be in included in your build, but the other bundles will be loaded from Onfido's CDN.

### 3. Add basic HTML markup

Expand Down
85 changes: 45 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,29 @@ An example of a valid referrer is `https://*.example.com/example_page/*`.

You can either:

- use our CDN
- import directly into your HTML page
- use npm
- use our CDN

#### 4.1 HTML Script Tag Include
#### 4.1 CDN

You can use hosted versions of the library files from Onfido's CDN.

From SDK 12.3.1 onwards, the version number you subscribe to can vary, depending on your needs:

- subscribing to a specific patch release (e.g. v12.3.1) will fix the library files to that SDK release
- subscribing to a minor level release (e.g. v12.3) means Onfido will update to the latest available patch release
- subscribing to a major release (e.g. v12) means Onfido will update to the latest available patch and minor release

```html
<!-- Replace "<version>" with the actual SDK version you want to use, example: v12 -->
<script src="https://sdk.onfido.com/<version>"></script>
<link href="https://sdk.onfido.com/<version>/style.css" rel="stylesheet" />
```

For versions prior to 12.3.1, specifying a precise release only, see our previous [documentation](https://github.com/onfido/onfido-sdk-ui/blob/12.3.0/README.md#43-cdn).

#### 4.2 HTML Script Tag Include

You can include the library as a regular script tag on your page:

Expand All @@ -140,9 +158,9 @@ And the CSS styles:

You can see a [simple example using script tags](https://jsfiddle.net/gh/get/library/pure/onfido/onfido-sdk-ui/tree/master/demo/fiddle/).

#### 4.2 NPM style import
#### 4.3 NPM style import

You can import the library as a module into your own JS build system (tested with Webpack):
Alternatively, you can import the library as a module into your own JS build system (tested with Webpack):

```shell
$ npm install --save onfido-sdk-ui
Expand Down Expand Up @@ -173,19 +191,6 @@ import 'onfido-sdk-ui/split/css'

⚠️ Note: The main bundle will be in included in your build, but the other bundles will be loaded from Onfido's CDN.

#### 4.3 CDN

Alternatively, you can use hosted versions of files above from our CDN such as:

```html
<!-- Replace "<version>" with the actual version you want to use, example: 9.0.0 -->
<script src="https://assets.onfido.com/web-sdk-releases/<version>/onfido.min.js"></script>
<link
href="https://assets.onfido.com/web-sdk-releases/<version>/style.css"
rel="stylesheet"
/>
```

### 5. Add basic HTML markup

Add an empty HTML element at the bottom of your page for the modal interface to mount itself on.
Expand Down Expand Up @@ -319,12 +324,20 @@ You can then decide to close the modal or keep it open by changing the property

## Removing the SDK

If you have embedded the SDK inside a single page app, you can call the `tearDown` function to remove the SDK completely from the current webpage. It will reset the state and you can safely re-initialize the SDK inside the same webpage later on.
If you have embedded the SDK inside a single page app, you can call the `safeTearDown` function to remove the SDK completely from the current webpage. It will reset the state and you can safely re-initialize the SDK inside the same webpage later on.

```javascript
onfidoOut = Onfido.init({...})
...
onfidoOut.tearDown()
await onfidoOut.safeTearDown()
```

⚠️ **Warning**: The `safeTearDown` method is a Promise. If you plan on mounting the SDK a second (or nth time), please await the promise first.

```javascript
onfidoOut = Onfido.init({...})
await onfidoOut.safeTearDown()
onfidoOut2 = Onfido.init({...})
```

## Initialization options
Expand Down Expand Up @@ -662,12 +675,6 @@ The following optional customizations are available for the introductory screen:
![Cross-device intro screen](demo/cross-device-logo.png)
#### Image capture upload fallback
The SDK will attempt to load an optimized camera UI to take a live photo. When this is not possible (because of an unsupported browser or mobile devices with no camera), the user will be presented with an HTML5 File Input. Set `uploadFallback` to `false` to disable this fallback feature and ensure live capture. Note that disabling `uploadFallback` will prevent users with an unsupported browser or a mobile device with no camera from continuing.
![Upload fallback](demo/upload-fallback.png)
- `genericDocumentTypes` (object)
You can add generic documents that are not supported by Onfido. They will be displayed at the bottom of the built-in document types.
Expand Down Expand Up @@ -726,21 +733,6 @@ The custom options are:

If the SDK is initialized with the `requestedVariant` option for the face step, make sure you use the data returned in the [`onComplete` callback](#handling-callbacks) to request the correct report when creating a check.

- `uploadFallback` (boolean - default: `true`)

By default, the SDK will attempt to open an optimised camera UI for the user to take a live photo or video. When this is not possible (because of an unsupported browser or mobile devices with no camera), by default the user will be presented with an HTML5 File Input upload because of `uploadFallback`. In this scenario, they will be able to use their mobile device's default camera application to take a photo, but will not be presented with an optimised camera UI.
This method does not guarantee live capture, because certain mobile device browsers and camera applications may also allow uploads from the user's gallery of photos.

⚠️ **Warning**: If the mobile device does not have a camera or lacks camera browser support the user will not be able to complete the flow if `uploadFallback` is set to `false`.

```javascript
options: {
requestedVariant: 'standard' | 'video',
uploadFallback: false
}
```

- `useMultipleSelfieCapture` (boolean - default: `true`)

When enabled, this feature allows the SDK to take additional selfie snapshots to help improve face similarity check accuracy. When disabled, only one selfie photo will be taken.
Expand Down Expand Up @@ -919,6 +911,15 @@ FACIAL_CAPTURE_CONFIRMATION - User reached the "selfie confirmation" screen
VIDEO_FACIAL_INTRO - User reached the "face video intro" screen
VIDEO_FACIAL_CAPTURE_STEP_1 - User reached the 1st challenge during "face video capture", challenge_type can be found in eventProperties
VIDEO_FACIAL_CAPTURE_STEP_2 - User reached the 2nd challenge during "face video capture", challenge_type can be found in eventProperties
MOTION_FACIAL_INTRO - User reached the "motion intro" screen
MOTION_FACIAL_ALIGNMENT - User reached the "motion alignment" screen
MOTION_FACIAL_CAPTURE - User reached the "motion capture" screen
MOTION_FACIAL_NO_FACE_DETECTED - User's face was not detected
MOTION_FACIAL_CAPTURE_ERROR_TIMEOUT - User's motion capture timed out
MOTION_FACIAL_CAPTURE_ERROR_TOO_FAST - User performed the motion headturn too fast
MOTION_FACIAL_UPLOAD - User's motion capture is uploading
MOTION_FACIAL_UPLOAD_COMPLETED - User's motion capture finished uploading
MOTION_FACIAL_CONNECTION_ERROR - User was presented the "motion connection error" screen during upload
UPLOAD - User's file is uploading
```
Expand Down Expand Up @@ -975,6 +976,10 @@ From version `6.5.0`, TypeScript is officially supported, providing typings for:
\* _Firefox on Android, iOS not supported_
### Node.js compatibility
The SDK is compatible with the all supported Node.js versions (currently starting with Node.js 16).
### Troubleshooting
#### Content Security Policy issues
Expand Down
2 changes: 1 addition & 1 deletion UI_CUSTOMIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The Web SDK supports customization options across the SDK screen including text,

| Links | Description |
| --------------------------- | ----------------------------------------- |
| `colorContentLinkTextHover` | Change Link text color |
| `colorContentLinkTextHover` | Change Link text color on hover |
| `colorBorderLinkUnderline` | Change Link underline color |
| `colorBackgroundLinkHover` | Change Link background color on hover |
| `colorBackgroundLinkActive` | Change Link background color on click/tap |
Expand Down
Loading

0 comments on commit c5ca4c7

Please sign in to comment.