@faceio/fiojs 1.1.0 β†’ 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +279 -365
  3. package/index.js +121 -102
  4. package/package.json +24 -17
package/README.md CHANGED
@@ -1,365 +1,279 @@
1
- ## Release Updates & Announcments:
2
- * [fio.js V2.1 Released with Age Verification & Minors Access Prevention](https://blog.pixlab.io/2023/06/age-verification-check-available-for-faceio-face-recognition)
3
- * Introducing the `fetchAllErrorCodes()` method for the NPM Package for much better error logging experience.
4
- * [New REST API Endpoints Available for FACEIO](https://blog.pixlab.io/2023/04/new-rest-api-endpoints-available-for-faceio)
5
- * [Liveness Detection & Face Anti-Spoofing Security Feature Available for FACEIO](https://www.biometricupdate.com/202303/pixlab-adds-active-liveness-detection-to-faceio-biometrics-framework)
6
- * [Webhooks Enhancements & Performance Improvements](https://blog.pixlab.io/2022/11/faceios-webhooks-enhancements-performance-improvements)
7
- * [fio.js V1.9 Released with Face Duplication Prevention](https://blog.pixlab.io/2022/10/fiojs-190-released-with-face-duplication-prevention)
8
-
9
- ## Introducing FACEIO NPM Package
10
-
11
- * **TLDR;** [FACEIO](https://faceio.net) is a facial authentication framework that is to be implemented on websites or web applications via simple JavaScript snippet (just like Disqus or Google Tag) to easily authenticate users via **Face Recognition instead of the traditional login/password pair or OTP code**.
12
- * FACEIO is a cross-browser, Cloud & On-Premise deployable, facial authentication framework, with a client-side JavaScript library (fio.js) that [integrates seamlessly](https://faceio.net/integration-guide) with any website or web application desiring to offer secure facial recognition experience to their users...
13
- * Put it simply, FACEIO is the easiest way to add passwordless authentication to websites or web applications. Simply implement fio.js on your website, and you will be able to **instantly authenticate your existing users, and enroll new ones via Face Recognition** using their computer Webcam or smartphone frontal camera on their favorite browser.
14
- * Once fio.js [implemented](https://faceio.net/integration-guide) on your website, you'll be able to instantly recognize your existing users, on-board new members securely with maximum convenience, and at real-time thanks to passwordless experience powered by face recognition.
15
-
16
- ![faceio-sample-app](https://user-images.githubusercontent.com/4615920/205783176-f5123b6f-08f1-448c-b023-2ccd6023a5f6.gif)
17
-
18
- # `fio.js` LIBRARY & WIDGET INTEGRATION
19
-
20
- The FACEIO Widget is a simple and elegant interface to provide **secure facial authentication experience to your users** via simple calls to the `enroll()` & `authenticate()` methods. The Widget is powered by the `fio.js `JavaScript library, which is simple enough to [integrate](https://faceio.net/integration-guide#fiojs-integration) in a matter of minutes while being flexible enough to support highly customized setups. Once implemented on your website or web-based application, you'll be able to authenticate your existing users, enroll new ones securely, with maximum convenience on their favorite browser, and at real-time thanks to passwordless experience powered by face recognition.
21
-
22
- `fio.js` works with regular webcams, and smartphones frontal camera on all modern browsers, **does not require biometric sensors**, and works seemingly with all websites and web applications regardless of the underlying front-end technology used (ie. React, Vue, jQuery, Vanilla Javascript, static HTML, etc.) or server-side language or framework (eg. PHP, Python, Node.js, Rust, Elixir, etc.).
23
-
24
- It’s super quick to get FACEIO Up & Running with just few lines of code. Follow the walkthrough below to implement `fio.js` on your site.
25
-
26
- > ## STEP 1 - IMPORT `fio.js` TO YOUR SITE
27
-
28
- ```js
29
- import faceIO from '@faceio/fiojs'
30
-
31
- const faceio = new faceIO('app-public-id') // Get the application Public ID at https://console.faceio.net.
32
- ```
33
-
34
- πŸ‘‰ You shouldn't run `fio.js` functions right after initiating it.
35
-
36
- πŸ’‘ Take a look to our **community contributed tutorials** [listed here](https://faceio.net/integration-guide#community-tutorials). They should help you implement `fio.js` on your website or web application using your favorite JavaScript framework whether it is React, Vue, Angular, Next or Vanilla JavaScript.
37
-
38
- > ## STEP 2 - INVOKE THE WIDGET
39
-
40
- ```js
41
- import faceIO from '@faceio/fiojs'
42
-
43
- const faceio = new faceIO('app-public-id'); // Get the application Public ID at https://console.faceio.net.
44
-
45
- function App() {
46
- return (
47
- <div className="App">
48
- <button onClick={enrollNewUser}>Enroll New User</button>
49
- <button onClick={authenticateUser}>Authenticate User</button>
50
- </div>
51
- );
52
- }
53
-
54
- async function enrollNewUser() {
55
- // call to faceio.enroll() here will automatically trigger the on-boarding process
56
- }
57
- async function authenticateUser(){
58
- // call to faceio.authenticate() here will automatically trigger the facial authentication process
59
- }
60
- function handleError(errCode){
61
- // Handle error here
62
- // Log all possible error codes during user interaction..
63
- // Refer to: https://faceio.net/integration-guide#error-codes
64
- // for a detailed overview when these errors are triggered.
65
- const fioErrs = faceio.fetchAllErrorCodes();
66
- switch (errCode) {
67
- case fioErrs.PERMISSION_REFUSED:
68
- console.log("Access to the Camera stream was denied by the end user");
69
- break;
70
- case fioErrs.NO_FACES_DETECTED:
71
- console.log("No faces were detected during the enroll or authentication process");
72
- break;
73
- case fioErrs.UNRECOGNIZED_FACE:
74
- console.log("Unrecognized face on this application's Facial Index");
75
- break;
76
- case fioErrs.MANY_FACES:
77
- console.log("Two or more faces were detected during the scan process");
78
- break;
79
- case fioErrs.FACE_DUPLICATION:
80
- console.log("User enrolled previously (facial features already recorded). Cannot enroll again!");
81
- break;
82
- case fioErrs.MINORS_NOT_ALLOWED:
83
- console.log("Minors are not allowed to enroll on this application!");
84
- break;
85
- case fioErrs.PAD_ATTACK:
86
- console.log("Presentation (Spoof) Attack (PAD) detected during the scan process");
87
- break;
88
- case fioErrs.FACE_MISMATCH:
89
- console.log("Calculated Facial Vectors of the user being enrolled do not matches");
90
- break;
91
- case fioErrs.WRONG_PIN_CODE:
92
- console.log("Wrong PIN code supplied by the user being authenticated");
93
- break;
94
- // ...
95
- // Refer to the boilerplate at: https://gist.github.com/symisc/34203d2811a39f2a871373abc6dd1ce9
96
- // for the list of all possible error codes.
97
- }
98
- }
99
-
100
- export default App;
101
- ```
102
-
103
- > ## `ENROLL()` - ENROLL NEW USER
104
- β€Ž
105
- > ### SYNTAX
106
-
107
- ```js
108
- const userInfo = await faceio
109
- .enroll({ parameters })
110
- .catch(errCode => {
111
- /* handle the error */
112
- })
113
-
114
- console.log(userInfo)
115
- ```
116
-
117
- > ### ALIAS
118
- `enrol()`, `register()`, `record()`
119
-
120
- > ### PARAMETERS
121
- `enroll()` takes a **single, optional `parameters` object** with the properties to be configured. The table below lists all possible `properties` of the parameters object:
122
-
123
- β€Ž
124
-
125
- | **Property Name** | **Type** | **Default Value** | **Description** |
126
- |--------------------|-----------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
127
- | `payload` | Any Serializable JSON | NULL | **An arbitrary set of data, you want to associate with the user being enrolled**. Example of useful payloads includes *Email Address, Name, ID, Token*, and so on. This payload will be **forwarded back to you** upon successful [future authentication](https://faceio.net/integration-guide#authenticate_return) of this particular user. Maximum payload size per user is set to 16KB. |
128
- | `permissionTimeout` | Number | 27 Seconds | **Total number of seconds to wait for the user to grant camera access permission**. Passing this delay, the ongoing `enroll()` operation is aborted and the promise is rejected with the `fioErrCode.PERMISSION_REFUSED` [error code](https://faceio.net/integration-guide#error-codes). |
129
- | `termsTimeout` | Number | 10 Minutes | **Total number of minutes to wait for the user to accept FACEIO/Host Application Terms of Service**. Passing this delay, the ongoing `enroll()` operation is aborted and the promise is rejected with the `fioErrCode.TERMS_NOT_ACCEPTED` [error code](https://faceio.net/integration-guide#error-codes). |
130
- | `idleTimeout` | Number | 27 Seconds | **Total number of seconds to wait before giving up if no faces were detected during the enrollment process**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.NO_FACES_DETECTED` [error code](https://faceio.net/integration-guide#error-codes). |
131
- | `replyTimeout` | Number | 40 Seconds | **Total number of seconds to wait before giving up if the remote FACEIO processing node does not return a response (a very unlikely scenario)**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.TIMEOUT` [error code](https://faceio.net/integration-guide#error-codes). |
132
- | `enrollIntroTimeout` | Number | 12 Seconds | Enrollment Widget introduction/instruction screen display delay. |
133
- | `locale` | String | auto | **Default interaction language for the Widget display**. If this value is missing or set to auto, then the interaction language will be deducted from the [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) HTTP request header. Otherwise, just pass the **BCP 47, two letter, language code** of your choice (en, ar, es, ja, de, etc.). If the requested interaction language is not supported, the fallback, default interaction language is **US English: en-us**. |
134
- | `userConsent` | Boolean | false | **If you have already collected user consent before enrollment** (eg. When the user create a new account on your Website and accept the terms), you can **set this parameter** to true. In which case, the Terms of Use consent screen is not displayed for the end user being enrolled. **It is your responsibility to explicitly ask for consent before enrolling a new user**. For additional information, please consult our Privacy Best Practices for applications. |
135
-
136
- β€Ž
137
-
138
- > ### RETURN VALUE
139
-
140
- **A Promise whose fulfillment handler receives a `userInfo` object when the user has successfully been enrolled**. On failure, the promise is rejected with one of the possible **error codes** [listed below](https://faceio.net/integration-guide#error-codes).
141
-
142
- The table below lists all fields of the `userInfo` object returned to your web application by `enroll()` when its promise is fulfilled:
143
-
144
- | **Property Name** | **Type** | **Description** |
145
- |---------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
146
- | `facialId` | UUID (String) | **A Universally Unique Identifier assigned to this particular user**. FACEIO recommend that your rely on this [Facial ID](https://faceio.net/facialid) (*which is automatically generated for each enrolled user on your application*), if you plan to uniquely identify all enrolled users on your backend for example. The Facial ID is discussed in details [here](https://faceio.net/facialid). |
147
- | `timestamp` | Timestamp (String) | [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), enrollment completion date & time. |
148
- | `details` | Object | An object with two fields: gender and age which respectively corresponds to the Gender and Age approximation of the enrolled user. |
149
-
150
- > ### EXAMPLE
151
-
152
- ```js
153
- import faceIO from '@faceio/fiojs'
154
-
155
- const faceio = new faceIO('app-public-id'); // Get the application Public ID at https://console.faceio.net.
156
-
157
- function App() {
158
- return (
159
- <div className="App">
160
- <button onClick={enrollNewUser}>Enroll New User</button>
161
- </div>
162
- );
163
- }
164
-
165
- async function enrollNewUser() {
166
- const userInfo = await faceio.enroll({
167
- "locale": "auto", // Default user locale
168
- "payload": {
169
- /* The payload we want to associate with this particular user which is forwarded back to us upon future authentication of this user.*/
170
- "whoami": 123456, // Dummy ID linked to this particular user
171
- "email": "john.doe@example.com"
172
- }
173
- });
174
-
175
- alert(
176
- `User Successfully Enrolled! Details:
177
- Unique Facial ID: ${userInfo.facialId}
178
- Enrollment Date: ${userInfo.timestamp}
179
- Gender: ${userInfo.details.gender}
180
- Age Approximation: ${userInfo.details.age}`
181
- );
182
- }
183
-
184
- export default App;
185
- ```
186
-
187
- > ## `AUTHENTICATE()` - IDENTIFY/RECOGNIZE ENROLLED USERS
188
- β€Ž
189
- > ### SYNTAX
190
-
191
- ```js
192
- const userInfo = await faceio
193
- .authenticate({ parameters })
194
- .catch(errCode => {
195
- /* handle the error */
196
- })
197
-
198
- console.log(userInfo)
199
- ```
200
-
201
- > ### ALIAS
202
- `auth()`, `recognize()`, `identify()`
203
-
204
- > ### PARAMETERS
205
-
206
- `authenticate()` takes a **single, optional `parameters` object** with the properties to be configured. The table below lists all possible properties of the `parameters` object:
207
-
208
- | **Property Name** | **Type** | **Default Value** | **Description** |
209
- |-------------------|--------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
210
- | `permissionTimeout` | Number | 27 Seconds | **Total number of seconds to wait for the user to grant camera access permission**. Passing this delay, the ongoing `authenticate()` operation is aborted and the promise is rejected with the `fioErrCode.PERMISSION_REFUSED` [error code](https://faceio.net/integration-guide#error-codes). |
211
- | `idleTimeout` | Number | 27 Seconds | **Total number of seconds to wait before giving up if no faces were detected during the authentication process**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.NO_FACES_DETECTED` [error code](https://faceio.net/integration-guide#error-codes). |
212
- | `replyTimeout` | Number | 40 Seconds | **Total number of seconds to wait before giving up if the remote FACEIO processing node does not return a response (a very unlikely scenario)**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.TIMEOUT` [error code](https://faceio.net/integration-guide#error-codes). |
213
- | `locale` | String | auto | **Default interaction language of the FACEIO Widget**. If this value is missing or set to auto, then the interaction language will be deducted from the [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) HTTP request header. Otherwise, just pass the **BCP 47, two letter, language code** of your choice (en, ar, es, ja, de, etc.). If the requested interaction language is not supported, the fallback, default interaction language is US **English: en-us**. |
214
-
215
- > ### RETURN VALUE
216
-
217
- β€Ž
218
-
219
- **A Promise whose fulfillment handler receives a `userData` object when the user has successfully been identified**. On failure, the promise is rejected with one of the possible **error codes** [listed below](https://faceio.net/integration-guide#error-codes).
220
-
221
- The table below lists all fields of the `userData` object returned to your web application by `authenticate()` when its promise is fulfilled:
222
-
223
- | **Property Name** | **Type** | **Description** |
224
- |---------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
225
- | payload | *Any* | The arbitrary data you have already linked (if any) to this particular user during his enrollment via the payload parameter of the enroll() method. | | |
226
- | `facialId` | *UUID (String)* | **The Universally Unique Identifier assigned to this particular user**. FACEIO recommend that your rely on this [Facial ID](https://faceio.net/facialid) (*which is automatically generated for each enrolled user on your application*), if you plan to uniquely identify all enrolled users on your backend for example. The Facial ID is discussed in details [here](https://faceio.net/facialid). |
227
-
228
- > ### EXAMPLE
229
-
230
- ```js
231
- import faceIO from '@faceio/fiojs'
232
-
233
- const faceio = new faceIO('app-public-id'); // Get the application Public ID at https://console.faceio.net.
234
-
235
- function App() {
236
- return (
237
- <div className="App">
238
- <button onClick={authenticateUser}>Authenticate User</button>
239
- </div>
240
- );
241
- }
242
-
243
- async function authenticateUser() {
244
- const userData = await faceio.authenticate({
245
- "locale": "auto", // Default user locale
246
- });
247
-
248
- console.log("Success, user identified")
249
- // Grab the facial ID linked to this particular user which will be same
250
- // for each of his successful future authentication. FACEIO recommend
251
- // that your rely on this Facial ID if you plan to uniquely identify
252
- // all enrolled users on your backend for example.
253
- console.log("Linked facial Id: " + userData.facialId)
254
- // Grab the arbitrary data you have already linked (if any) to this particular user
255
- // during his enrollment via the payload parameter of the enroll() method.
256
- console.log("Payload: " + JSON.stringify(userData.payload)) // {"whoami": 123456, "email": "john.doe@example.com"} from the enroll() example above
257
- }
258
-
259
- export default App;
260
- ```
261
-
262
- > ## `RESTARTSESSION()` - REQUEST NEW USER SESSION
263
- β€Ž
264
- > ### SYNTAX
265
- β€Ž
266
- ```js
267
- const boolean = await faceio.restartSession({})
268
- ```
269
-
270
- > ### PARAMETERS
271
- β€Ž
272
- *None*
273
-
274
- > ### RETURN VALUE
275
-
276
- `true` if the request for a new session have been granted, and ready for another round of calls to [enroll()](https://faceio.net/integration-guide#enroll) or [authenticate()](https://faceio.net/integration-guide#authenticate) for the same user. false otherwise.
277
-
278
-
279
- > ## ERROR CODES
280
- β€Ž
281
- The table below lists all possible error codes that are returned from either the `enroll()` or the `authenticate()` methods when **their promises are rejected respectively**.
282
-
283
- | **Error Code** | **Description** | **Effect on `enroll()` or `authenticate()`** |
284
- |--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
285
- | `fioErrCode.PERMISSION_REFUSED` | Access to the camera stream was **denied** by the end user. | Ongoing operation is **immediately aborted** and control is transferred to the host |
286
- | `fioErrCode.TERMS_NOT_ACCEPTED` | Terms & Conditions set out by FACEIO/host application **rejected** by the end user. | Ongoing operation is **immediately aborted** and control is transferred to the host |
287
- | `fioErrCode.SESSION_IN_PROGRESS` | Another [authentication](https://faceio.net/integration-guide#authenticate) or [enrollment](https://faceio.net/integration-guide#enroll) operation is processing. This can happen when your application logic calls more than once `enroll()` or `authenticate()` due to poor UI implementation on your side (eg. User taps twice the same button triggering the facial authentication process). **Starting with [fio.js 1.9](https://blog.pixlab.io/2022/10/fiojs-190-released-with-face-duplication-prevention), it is possible now to restart the current user session without reloading the entire HTML page via simple call to the [`restartSession()`](https://faceio.net/integration-guide#restart_sess) method**. | Ongoing operation is **still processing** and the FACEIO Widget **continue** running. Your error handler routine should probably **ignore this error code** as the operation is still ongoing. | | |
288
- | `fioErrCode.FACE_DUPLICATION` | **This error code is raised when the same user tries to enroll a second time on your application. That is, his facial features are already recorded due to previous enrollment, and can no longer enroll again due to the security settings: *Prevent Same User from Enrolling Twice* or *More* being activated**. | Ongoing `enroll()` operation is **immediately aborted** and control is transferred to the host application. | | |
289
- | `fioErrCode.TIMEOUT` | **Ongoing operation timed out** (eg, camera Access Permission, ToS Accept, Face not yet detected, Server Reply, etc.). | Ongoing operation is **immediately aborted** and control is transferred to the host |
290
- | `fioErrCode.NO_FACES_DETECTED` | **No faces were detected** during the enroll or authentication process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
291
- | `fioErrCode.UNRECOGNIZED_FACE` | **Unrecognized/unknown face** on this application Facial Index. | Ongoing operation is **immediately aborted** and control is transferred to the host |
292
- | `fioErrCode.MANY_FACES` | **Two or more faces** were detected during the [enroll](https://faceio.net/integration-guide#enroll) or [authentication](https://faceio.net/integration-guide#authenticate) process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
293
- | `fioErrCode.PAD_ATTACK` | Presentation attack (PAD), better know as face spoofing attempt is detected during the authentication process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
294
- | `fioErrCode.UNIQUE_PIN_REQUIRED` | Supplied PIN Code **must be unique** among other PIN's on this application. This warning code is **raised only from the `enroll()` method**, and only if you have enabled the *Enforce PIN Code Uniqueness* [Security Option](https://faceio.net/security-best-practice). | Ongoing `enroll()` operation is **still processing** until the user being enrolled **input a unique PIN code**. | | |
295
- | `fioErrCode.FACE_MISMATCH` | Calculated Facial Vectors of the **user being [enrolled](https://faceio.net/integration-guide#enroll) do not matches**. This error code **is raised only from the `enroll()` method**. | Ongoing `enroll()` operation is **immediately aborted** and control is transferred to the host application. | | |
296
- | `fioErrCode.WRONG_PIN_CODE` | **Wrong PIN Code supplied** by the user being [authenticated](https://faceio.net/integration-guide#authenticate). This error code is **raised only from the `authenticate()` method**. | Ongoing `authenticate()` operation is **immediately aborted after three trials** and control is transferred to the host application. | | |
297
- | `fioErrCode.NETWORK_IO` | Error while establishing network connection with the FACEIO processing node. | Ongoing operation is **immediately aborted** and control is transferred to the host |
298
- | `fioErrCode.PROCESSING_ERR` | Server side error. | Ongoing operation is **immediately aborted** and control is transferred to the host |
299
- | `fioErrCode.UNAUTHORIZED` | Your application is not allowed to perform the requested operation (eg. *Invalid ID, Blocked, Paused*, etc.). Refer to the [FACEIO Console](https://console.faceio.net/) for additional information. | Ongoing operation is **immediately aborted** and control is transferred to the host |
300
- | `fioErrCode.UI_NOT_READY` | The FACEIO `fio.js` library could not be injected onto the client DOM. | Ongoing operation is **immediately aborted** and control is transferred to the host |
301
- | `fioErrCode.TOO_MANY_REQUESTS` | Widget instantiation requests exceeded for freemium applications. **Does not apply for premium applications as `fio.js` instantiation is unmetered**. | Ongoing operation is **immediately aborted** and control is transferred to the host |
302
- | `fioErrCode.EMPTY_ORIGIN` | *Origin* or *Referer* HTTP request header is **empty or missing** while instantiating `fio.js`. This error is **raised only if you have enforced** the *Reject Empty Origin* [Security Option](https://faceio.net/security-best-practice#rejectMissingHeaders). | Ongoing operation is **immediately aborted** and control is transferred to the host |
303
- | `fioErrCode.FORBIDDDEN_ORIGIN` | Domain origin is forbidden from instantiating `fio.js`. This error is **raised only if you have created a white list of authorized domain names** via the [FACEIO Console](https://console.faceio.net/). | Ongoing operation is **immediately aborted** and control is transferred to the host |
304
- | `fioErrCode.FORBIDDDEN_COUNTRY` | Country ISO-3166-1 Code is forbidden from instantiating `fio.js`. This error is **raised only if you have created a white list of authorized countries** via the [FACEIO Console](https://console.faceio.net/). | Ongoing operation is **immediately aborted** and control is transferred to the host |
305
-
306
- > ## REACTJS INTEGRATION BOILERPLATE
307
-
308
- ```js
309
- import faceIO from '@faceio/fiojs'
310
-
311
- const faceio = new faceIO('app-public-id');
312
-
313
- function App() {
314
- return (
315
- <div className="App">
316
- <button onClick={enrollNewUser}>Enroll New User</button>
317
- <button onClick={authenticateUser}>Authenticate User</button>
318
- </div>
319
- );
320
- }
321
-
322
- async function enrollNewUser() {
323
- const userInfo = await faceio.enroll({
324
- "locale": "auto", // Default user locale
325
- "payload": {
326
- /* The payload we want to associate with this particular user which is forwarded back to us upon future authentication of this user.*/
327
- "whoami": 123456, // Dummy ID linked to this particular user
328
- "email": "john.doe@example.com"
329
- }
330
- });
331
-
332
- alert(
333
- `User Successfully Enrolled! Details:
334
- Unique Facial ID: ${userInfo.facialId}
335
- Enrollment Date: ${userInfo.timestamp}
336
- Gender: ${userInfo.details.gender}
337
- Age Approximation: ${userInfo.details.age}`
338
- );
339
- }
340
- async function authenticateUser() {
341
- const userData = await faceio.authenticate({
342
- "locale": "auto", // Default user locale
343
- });
344
-
345
- console.log("Success, user identified")
346
- // Grab the facial ID linked to this particular user which will be same
347
- // for each of his successful future authentication. FACEIO recommend
348
- // that your rely on this Facial ID if you plan to uniquely identify
349
- // all enrolled users on your backend for example.
350
- console.log("Linked facial Id: " + userData.facialId)
351
- // Grab the arbitrary data you have already linked (if any) to this particular user
352
- // during his enrollment via the payload parameter of the enroll() method.
353
- console.log("Payload: " + JSON.stringify(userData.payload)) // {"whoami": 123456, "email": "john.doe@example.com"} from the enroll() example above
354
- }
355
-
356
- export default App;
357
- ```
358
-
359
- # Further Reading
360
- Finally, for additional information & to learn more about implementing FACEIO on your website or web application, please refer to the following documents:
361
- - **[Getting Started Tutorial](https://faceio.net/getting-started)**: Learn the fundamentals about implementing facial authentication on a typical web application.
362
- - **[Integration Guide](https://faceio.net/integration-guide)**: Learn how to implement ***fio.js***, our facial recognition library on your website.
363
- - **[Developer Center](https://faceio.net/dev-guides)**: Code samples, documentation, support channels, and all the resources yo need to implement FACEIO on your website.
364
- - **[Frequently Asked Questions](https://faceio.net/faq)**: Get instant answers to the most common questions.
365
- - **[Trust Center](https://faceio.net/trust-center)**: Learn how we handle your data securely and in compliance with privacy and legal requirements.
1
+ ## Release Updates & Announcements:
2
+ * **[fio.js V3.0 Released! Featuring Intelligent Visual Guidance, 60 FPS Rendering, Virtual Camera Defense, and Major UI/UX Overhauls.](https://faceio.net/)**
3
+ * [FACEIO Launches New REST APIs for Age and Gender Estimation](https://community.faceio.net/threads/announcements-faceio-launches-new-rest-apis-for-age-and-gender-estimation-rest-api-237)
4
+ * [fio.js V2.1 Released with Age Verification & Minors Access Prevention](https://blog.pixlab.io/2023/06/age-verification-check-available-for-faceio-face-recognition)
5
+ * Introducing the `fetchAllErrorCodes()` method for the NPM Package for much better error logging experience.
6
+ * [New REST API Endpoints Available for FACEIO](https://blog.pixlab.io/2023/04/new-rest-api-endpoints-available-for-faceio)
7
+ * [Resolving Liveness Detection with FACEIO's Advanced AI Models](https://blog.pixlab.io/2024/07/resolving-liveness-detection-issues-with-faceios-advanced-ai-models)
8
+ * [Liveness Detection & Face Anti-Spoofing Security Feature Available for FACEIO](https://www.biometricupdate.com/202303/pixlab-adds-active-liveness-detection-to-faceio-biometrics-framework)
9
+ * [fio.js V1.9 Released with Face Duplication Prevention](https://blog.pixlab.io/2022/10/fiojs-190-released-with-face-duplication-prevention)
10
+
11
+ ## Introducing FACEIO NPM Package
12
+
13
+ * **TLDR;** [FACEIO](https://faceio.net) is a facial authentication framework that is to be implemented on websites or web applications via simple JavaScript snippet (just like Disqus or Google Tag) to easily authenticate users via **Face Recognition instead of the traditional login/password pair or OTP code**.
14
+ * FACEIO is a cross-browser, Cloud & On-Premise deployable, facial authentication framework, with a client-side JavaScript library (`fio.js`) that [integrates seamlessly](https://faceio.net/integration-guide) with any website or web application desiring to offer secure facial recognition experience to their users.
15
+ * Put simply, FACEIO is the easiest way to add passwordless authentication to websites or web applications. Simply implement `fio.js` on your website, and you will be able to **instantly authenticate your existing users, and enroll new ones via Face Recognition** using their computer Webcam or smartphone frontal camera on their favorite browser.
16
+ * Once `fio.js` is [implemented](https://faceio.net/integration-guide) on your website, you'll be able to instantly recognize your existing users, on-board new members securely with maximum convenience, and at real-time thanks to passwordless experience powered by face recognition.
17
+
18
+ # `fio.js` LIBRARY & WIDGET INTEGRATION
19
+
20
+ The FACEIO Widget is a simple and elegant interface to provide **secure facial authentication experience to your users** via simple calls to the `enroll()` & `authenticate()` methods. The Widget is powered by the `fio.js` JavaScript library, which is simple enough to [integrate](https://faceio.net/integration-guide#fiojs-integration) in a matter of minutes while being flexible enough to support highly customized setups.
21
+
22
+ `fio.js` works with regular webcams, and smartphones frontal camera on all modern browsers, **does not require biometric sensors**, and works seamlessly with all websites and web applications regardless of the underlying front-end technology used (ie. React, Vue, jQuery, Vanilla Javascript, static HTML, etc.) or server-side language or framework.
23
+
24
+ > ## STEP 1 - IMPORT `fio.js` TO YOUR SITE
25
+
26
+ ```js
27
+ import faceIO from '@faceio/fiojs'
28
+
29
+ const faceio = new faceIO('app-public-id') // Get the application Public ID at https://console.faceio.net.
30
+ ```
31
+
32
+ πŸ‘‰ You shouldn't run `fio.js` functions right after initiating it. Let the DOM load.
33
+
34
+ πŸ’‘ Take a look to our **community contributed tutorials** [listed here](https://faceio.net/integration-guide#community-tutorials). They should help you implement `fio.js` on your website or web application using your favorite JavaScript framework whether it is React, Vue, Angular, Next or Vanilla JavaScript.
35
+
36
+ > ## STEP 2 - INVOKE THE WIDGET
37
+
38
+ ```js
39
+ import faceIO from '@faceio/fiojs'
40
+
41
+ const faceio = new faceIO('app-public-id'); // Get the application Public ID at https://console.faceio.net.
42
+
43
+ function App() {
44
+ return (
45
+ <div className="App">
46
+ <button onClick={enrollNewUser}>Enroll New User</button>
47
+ <button onClick={authenticateUser}>Authenticate User</button>
48
+ </div>
49
+ );
50
+ }
51
+
52
+ async function enrollNewUser() {
53
+ // call to faceio.enroll() here will automatically trigger the on-boarding process
54
+ }
55
+ async function authenticateUser(){
56
+ // call to faceio.authenticate() here will automatically trigger the facial authentication process
57
+ }
58
+ function handleError(errCode){
59
+ // Handle error here
60
+ // Log all possible error codes during user interaction..
61
+ const fioErrs = faceio.fetchAllErrorCodes();
62
+ switch (errCode) {
63
+ case fioErrs.PERMISSION_REFUSED:
64
+ console.log("Access to the Camera stream was denied by the end user");
65
+ break;
66
+ case fioErrs.NO_FACES_DETECTED:
67
+ console.log("No faces were detected during the enroll or authentication process");
68
+ break;
69
+ case fioErrs.UNRECOGNIZED_FACE:
70
+ console.log("Unrecognized face on this application's Facial Index");
71
+ break;
72
+ case fioErrs.MANY_FACES:
73
+ console.log("Two or more faces were detected during the scan process");
74
+ break;
75
+ case fioErrs.FACE_DUPLICATION:
76
+ console.log("User enrolled previously (facial features already recorded). Cannot enroll again!");
77
+ break;
78
+ case fioErrs.MINORS_NOT_ALLOWED:
79
+ console.log("Minors are not allowed to enroll on this application!");
80
+ break;
81
+ case fioErrs.PAD_ATTACK:
82
+ console.log("Presentation (Spoof) Attack (PAD) detected during the scan process");
83
+ break;
84
+ case fioErrs.FACE_MISMATCH:
85
+ console.log("Calculated Facial Vectors of the user being enrolled do not matches");
86
+ break;
87
+ case fioErrs.WRONG_PIN_CODE:
88
+ console.log("Wrong PIN code supplied by the user being authenticated");
89
+ break;
90
+ case fioErrs.ABORTED_BY_USER:
91
+ console.log("User explicitly aborted the enrollment process via the close button");
92
+ break;
93
+ // ...
94
+ // Refer to the boilerplate at: https://gist.github.com/symisc/34203d2811a39f2a871373abc6dd1ce9
95
+ // for the list of all possible error codes.
96
+ }
97
+ }
98
+
99
+ export default App;
100
+ ```
101
+
102
+ > ## `ENROLL()` - ENROLL NEW USER
103
+
104
+ > ### SYNTAX
105
+
106
+ ```js
107
+ const userInfo = await faceio
108
+ .enroll({ parameters })
109
+ .catch(errCode => {
110
+ /* handle the error */
111
+ })
112
+
113
+ console.log(userInfo)
114
+ ```
115
+
116
+ > ### ALIAS
117
+ `enrol()`, `register()`, `record()`
118
+
119
+ > ### PARAMETERS
120
+ `enroll()` takes a **single, optional `parameters` object** with the properties to be configured. The table below lists all possible `properties` of the parameters object:
121
+
122
+
123
+
124
+ | **Property Name** | **Type** | **Default Value** | **Description** |
125
+ |--------------------|-----------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
126
+ | `payload` | Any Serializable JSON | NULL | **An arbitrary set of data, you want to associate with the user being enrolled**. Example of useful payloads includes *Email Address, Name, ID, Token*, and so on. This payload will be **forwarded back to you** upon successful [future authentication](https://faceio.net/integration-guide#authenticate_return) of this particular user. Maximum payload size per user is set to 16KB. |
127
+ | `permissionTimeout` | Number | 27 Seconds | **Total number of seconds to wait for the user to grant camera access permission**. Passing this delay, the ongoing `enroll()` operation is aborted and the promise is rejected with the `fioErrCode.PERMISSION_REFUSED` error. |
128
+ | `termsTimeout` | Number | 10 Minutes | **Total number of minutes to wait for the user to accept FACEIO/Host Application Terms of Service**. Passing this delay, the ongoing `enroll()` operation is aborted and the promise is rejected with the `fioErrCode.TERMS_NOT_ACCEPTED` error. |
129
+ | `idleTimeout` | Number | 27 Seconds | **Total number of seconds to wait before giving up if no faces were detected during the enrollment process**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.NO_FACES_DETECTED` error. |
130
+ | `replyTimeout` | Number | 60 Seconds | **Total number of seconds to wait before giving up if the remote FACEIO processing node does not return a response (a very unlikely scenario)**. Passing this delay, the ongoing operation is aborted and the promise is rejected with the `fioErrCode.TIMEOUT` error. |
131
+ | `enrollIntroTimeout` | Number | 11 Seconds | Enrollment Widget introduction/instruction screen display delay. |
132
+ | `locale` | String | auto | **Default interaction language for the Widget display**. If this value is missing or set to auto, then the interaction language will be deducted from the HTTP request header. Otherwise, just pass the **BCP 47, two letter, language code** of your choice (en, ar, es, ja, de, etc.). |
133
+ | `userConsent` | Boolean | false | **If you have already collected user consent before enrollment** you can **set this parameter** to true. In which case, the Terms of Use consent screen is not displayed for the end user being enrolled. **It is your responsibility to explicitly ask for consent before enrolling a new user**. |
134
+ | `showAbortBtn` | Boolean | false | **Set to true if you want the abort button (close modal) to always appear during enrollment.** If the user explicitly aborts the enrollment process by clicking this button, the `fioErrCode.ABORTED_BY_USER` error will be raised. |
135
+
136
+
137
+
138
+ > ### RETURN VALUE
139
+
140
+ **A Promise whose fulfillment handler receives a `userInfo` object when the user has successfully been enrolled**. On failure, the promise is rejected with one of the possible **error codes**.
141
+
142
+ The table below lists all fields of the `userInfo` object returned to your web application by `enroll()` when its promise is fulfilled:
143
+
144
+ | **Property Name** | **Type** | **Description** |
145
+ |---------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
146
+ | `facialId` | UUID (String) | **A Universally Unique Identifier assigned to this particular user**. FACEIO recommend that your rely on this [Facial ID](https://faceio.net/facialid) if you plan to uniquely identify all enrolled users on your backend for example. The Facial ID is discussed in details [here](https://faceio.net/facialid). |
147
+ | `timestamp` | Timestamp (String) | [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), enrollment completion date & time. |
148
+ | `details` | Object | An object with two fields: gender and age which respectively corresponds to the Gender and Age approximation of the enrolled user. |
149
+
150
+ > ### EXAMPLE
151
+
152
+ ```js
153
+ import faceIO from '@faceio/fiojs'
154
+
155
+ const faceio = new faceIO('app-public-id'); // Get the application Public ID at https://console.faceio.net.
156
+
157
+ function App() {
158
+ return (
159
+ <div className="App">
160
+ <button onClick={enrollNewUser}>Enroll New User</button>
161
+ </div>
162
+ );
163
+ }
164
+
165
+ async function enrollNewUser() {
166
+ try {
167
+ const userInfo = await faceio.enroll({
168
+ "locale": "auto", // Default user locale
169
+ "showAbortBtn": true, // Show the close modal button
170
+ "payload": {
171
+ "whoami": 123456, // Dummy ID linked to this particular user
172
+ "email": "john.doe@example.com"
173
+ }
174
+ });
175
+
176
+ alert(
177
+ `User Successfully Enrolled! Details:
178
+ Unique Facial ID: ${userInfo.facialId}
179
+ Enrollment Date: ${userInfo.timestamp}
180
+ Gender: ${userInfo.details.gender}
181
+ Age Approximation: ${userInfo.details.age}`
182
+ );
183
+ } catch (errCode) {
184
+ // Handle error...
185
+ }
186
+ }
187
+
188
+ export default App;
189
+ ```
190
+
191
+ > ## `AUTHENTICATE()` - IDENTIFY/RECOGNIZE ENROLLED USERS
192
+
193
+ > ### SYNTAX
194
+
195
+ ```js
196
+ const userInfo = await faceio
197
+ .authenticate({ parameters })
198
+ .catch(errCode => {
199
+ /* handle the error */
200
+ })
201
+
202
+ console.log(userInfo)
203
+ ```
204
+
205
+ > ### ALIAS
206
+ `auth()`, `recognize()`, `identify()`
207
+
208
+ > ### PARAMETERS
209
+
210
+ `authenticate()` takes a **single, optional `parameters` object** with the properties to be configured. The table below lists all possible properties of the `parameters` object:
211
+
212
+ | **Property Name** | **Type** | **Default Value** | **Description** |
213
+ |-------------------|--------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
214
+ | `permissionTimeout` | Number | 27 Seconds | **Total number of seconds to wait for the user to grant camera access permission**. Passing this delay, the ongoing `authenticate()` operation is aborted. |
215
+ | `idleTimeout` | Number | 27 Seconds | **Total number of seconds to wait before giving up if no faces were detected during the authentication process**. Passing this delay, the ongoing operation is aborted. |
216
+ | `replyTimeout` | Number | 60 Seconds | **Total number of seconds to wait before giving up if the remote FACEIO processing node does not return a response (a very unlikely scenario)**. Passing this delay, the ongoing operation is aborted. |
217
+ | `locale` | String | auto | **Default interaction language of the FACEIO Widget**. If this value is missing or set to auto, then the interaction language will be deducted from the HTTP request header. |
218
+
219
+ > ### RETURN VALUE
220
+
221
+
222
+
223
+ **A Promise whose fulfillment handler receives a `userData` object when the user has successfully been identified**. On failure, the promise is rejected with one of the possible **error codes**.
224
+
225
+ The table below lists all fields of the `userData` object returned to your web application by `authenticate()` when its promise is fulfilled:
226
+
227
+ | **Property Name** | **Type** | **Description** |
228
+ |---------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
229
+ | payload | *Any* | The arbitrary data you have already linked (if any) to this particular user during his enrollment via the payload parameter of the enroll() method. | | |
230
+ | `facialId` | *UUID (String)* | **The Universally Unique Identifier assigned to this particular user**. |
231
+
232
+ > ## `RESTARTSESSION()` - REQUEST NEW USER SESSION
233
+
234
+ > ### SYNTAX
235
+
236
+ ```js
237
+ const boolean = await faceio.restartSession({})
238
+ ```
239
+
240
+ > ### RETURN VALUE
241
+
242
+ `true` if the request for a new session have been granted, and ready for another round of calls to [enroll()](https://faceio.net/integration-guide#enroll) or [authenticate()](https://faceio.net/integration-guide#authenticate) for the same user. false otherwise.
243
+
244
+
245
+ > ## ERROR CODES
246
+
247
+ The table below lists all possible error codes that are returned from either the `enroll()` or the `authenticate()` methods when **their promises are rejected respectively**.
248
+
249
+ | **Error Code** | **Description** | **Effect on `enroll()` or `authenticate()`** |
250
+ |--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
251
+ | `fioErrCode.PERMISSION_REFUSED` | Access to the camera stream was **denied** by the end user. | Ongoing operation is **immediately aborted** and control is transferred to the host |
252
+ | `fioErrCode.TERMS_NOT_ACCEPTED` | Terms & Conditions set out by FACEIO/host application **rejected** by the end user. | Ongoing operation is **immediately aborted** and control is transferred to the host |
253
+ | `fioErrCode.SESSION_IN_PROGRESS` | Another [authentication](https://faceio.net/integration-guide#authenticate) or [enrollment](https://faceio.net/integration-guide#enroll) operation is processing. This can happen when your application logic calls more than once `enroll()` or `authenticate()` due to poor UI implementation on your side. **It is possible now to restart the current user session without reloading the entire HTML page via simple call to the [`restartSession()`](https://faceio.net/integration-guide#restart_sess) method**. | Ongoing operation is **still processing** and the FACEIO Widget **continue** running. Your error handler routine should probably **ignore this error code** as the operation is still ongoing. | | |
254
+ | `fioErrCode.FACE_DUPLICATION` | **This error code is raised when the same user tries to enroll a second time on your application.** | Ongoing `enroll()` operation is **immediately aborted** and control is transferred to the host application. | | |
255
+ | `fioErrCode.TIMEOUT` | **Ongoing operation timed out** (eg, camera Access Permission, ToS Accept, Face not yet detected, Server Reply, etc.). | Ongoing operation is **immediately aborted** and control is transferred to the host |
256
+ | `fioErrCode.NO_FACES_DETECTED` | **No faces were detected** during the enroll or authentication process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
257
+ | `fioErrCode.UNRECOGNIZED_FACE` | **Unrecognized/unknown face** on this application Facial Index. | Ongoing operation is **immediately aborted** and control is transferred to the host |
258
+ | `fioErrCode.MANY_FACES` | **Two or more faces** were detected during the [enroll](https://faceio.net/integration-guide#enroll) or [authentication](https://faceio.net/integration-guide#authenticate) process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
259
+ | `fioErrCode.PAD_ATTACK` | Presentation attack (PAD), better know as face spoofing attempt or Virtual Camera injection is detected during the authentication process. | Ongoing operation is **immediately aborted** and control is transferred to the host |
260
+ | `fioErrCode.UNIQUE_PIN_REQUIRED` | Supplied PIN Code **must be unique** among other PIN's on this application. This warning code is **raised only from the `enroll()` method**. | Ongoing `enroll()` operation is **still processing** until the user being enrolled **input a unique PIN code**. | | |
261
+ | `fioErrCode.FACE_MISMATCH` | Calculated Facial Vectors of the **user being [enrolled](https://faceio.net/integration-guide#enroll) do not matches**. This error code **is raised only from the `enroll()` method**. | Ongoing `enroll()` operation is **immediately aborted** and control is transferred to the host application. | | |
262
+ | `fioErrCode.WRONG_PIN_CODE` | **Wrong PIN Code supplied** by the user being [authenticated](https://faceio.net/integration-guide#authenticate). This error code is **raised only from the `authenticate()` method**. | Ongoing `authenticate()` operation is **immediately aborted after three trials** and control is transferred to the host application. | | |
263
+ | `fioErrCode.NETWORK_IO` | Error while establishing network connection with the FACEIO processing node. | Ongoing operation is **immediately aborted** and control is transferred to the host |
264
+ | `fioErrCode.PROCESSING_ERR` | Server side error. | Ongoing operation is **immediately aborted** and control is transferred to the host |
265
+ | `fioErrCode.UNAUTHORIZED` | Your application is not allowed to perform the requested operation (eg. *Invalid ID, Blocked, Paused*, etc.). Refer to the [FACEIO Console](https://console.faceio.net/) for additional information. | Ongoing operation is **immediately aborted** and control is transferred to the host |
266
+ | `fioErrCode.UI_NOT_READY` | The FACEIO `fio.js` library could not be injected onto the client DOM. | Ongoing operation is **immediately aborted** and control is transferred to the host |
267
+ | `fioErrCode.TOO_MANY_REQUESTS` | Widget instantiation requests exceeded for freemium applications. **Does not apply for premium applications as `fio.js` instantiation is unmetered**. | Ongoing operation is **immediately aborted** and control is transferred to the host |
268
+ | `fioErrCode.EMPTY_ORIGIN` | *Origin* or *Referer* HTTP request header is **empty or missing** while instantiating `fio.js`. This error is **raised only if you have enforced** the *Reject Empty Origin* [Security Option](https://faceio.net/security-best-practice#rejectMissingHeaders). | Ongoing operation is **immediately aborted** and control is transferred to the host |
269
+ | `fioErrCode.FORBIDDEN_ORIGIN` | Domain origin is forbidden from instantiating `fio.js`. This error is **raised only if you have created a white list of authorized domain names** via the [FACEIO Console](https://console.faceio.net/). | Ongoing operation is **immediately aborted** and control is transferred to the host |
270
+ | `fioErrCode.FORBIDDEN_COUNTRY` | Country ISO-3166-1 Code is forbidden from instantiating `fio.js`. This error is **raised only if you have created a white list of authorized countries** via the [FACEIO Console](https://console.faceio.net/). | Ongoing operation is **immediately aborted** and control is transferred to the host |
271
+ | `fioErrCode.ABORTED_BY_USER` | Ongoing operation was cancelled at the user's request (e.g., by clicking the close modal button). This error code is raised only from the `enroll()` method when `showAbortBtn` is passed. | Ongoing `enroll()` operation is **immediately aborted** and control is transferred to the host |
272
+
273
+ # Further Reading
274
+ Finally, for additional information & to learn more about implementing FACEIO on your website or web application, please refer to the following documents:
275
+ - **[Getting Started Tutorial](https://faceio.net/getting-started)**: Learn the fundamentals about implementing facial authentication on a typical web application.
276
+ - **[Integration Guide](https://faceio.net/integration-guide)**: Learn how to implement ***fio.js***, our facial recognition library on your website.
277
+ - **[Developer Center](https://faceio.net/dev-guides)**: Code samples, documentation, support channels, and all the resources yo need to implement FACEIO on your website.
278
+ - **[Frequently Asked Questions](https://faceio.net/faq)**: Get instant answers to the most common questions.
279
+ - **[Trust Center](https://faceio.net/trust-center)**: Learn how we handle your data securely and in compliance with privacy and legal requirements.