You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-13Lines changed: 22 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,16 @@
2
2
3
3
The official Node.js library for integrating with the Onfido API.
4
4
5
-
Documentation can be found at <https://documentation.onfido.com>.
5
+
Documentation is available at <https://documentation.onfido.com>.
6
6
7
-
This library is only for use on the backend, as it uses Onfido API tokens which must be kept secret. If you do need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs: [iOS](https://github.com/onfido/onfido-ios-sdk), [Android](https://github.com/onfido/onfido-android-sdk), [Web](https://github.com/onfido/onfido-sdk-ui), and [React Native](https://github.com/onfido/react-native-sdk).
7
+
This library is for backend use only, as it requires secret Onfido API tokens and should not be used in the frontend due to security reasons.
8
+
9
+
If you need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs:
This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.
10
17
@@ -58,7 +65,7 @@ Configure with your API token and region:
58
65
constonfido=newDefaultApi(
59
66
newConfiguration({
60
67
apiToken:process.env.ONFIDO_API_TOKEN,
61
-
region:Region.EU, // Supports Region.EU, Region.US and Region.CA
Webhook events payload needs to be verified before it can be accessed. Libraryallows to easily decode the payload and verify its signature before returning it as an object for user convenience:
172
+
Webhook events payload needs to be verified before it can be accessed. Verifying webhook payloads is crucial for security reasons, as it ensures that the payloads are indeed from Onfido and have not been tampered with. The library allows you to easily decode the payload and verify its signature before returning it as an object for user convenience:
166
173
167
174
```js
168
175
(async () => {
@@ -184,41 +191,43 @@ Webhook events payload needs to be verified before it can be accessed. Library a
184
191
185
192
#### Do not use square bracket syntax
186
193
187
-
Except for accessing Task object's outputs, retain from using the square bracket syntax (i.e. `[]`) to access not defined properties to avoid breaking changes when these fields will appear.
194
+
Except for accessing Task object's outputs, avoid using the square bracket syntax (i.e. `[]`) to access undefined properties to prevent breaking changes when these fields appear.
188
195
189
196
## Contributing
190
197
191
-
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore all the contributions, except tests files, should target [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository.
198
+
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore, all contributions (except test files) should target the [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository. Please follow the contribution guidelines provided in the OpenAPI specification repository.
192
199
193
200
For contributions to the tests instead, please follow the steps below:
0 commit comments