Getting started
Remote
Include the .js file directly from the CDN:
Current versions
SDK | Category | Version |
---|---|---|
Identity | Stable |
Utilization
Creating an SDK instance
The SDK's constructor method takes the Identity token as a parameter (see how to get yours here). In addition, you can optionally enter the SDK's initialization options.
Example using import via CDN:
Options
parameters:
Options
parameters:Field | Type | Required? | Description |
|
| No* | A valid token for passive proof of life in mobile SDKs. |
|
| No | Indicates whether, when called a second time without the first call having completed, the SDK should throw an error. If not entered or entered false, the SDK returns the existing Promise without triggering an error. If true, the SDK rejects the Promise on the second call. |
| object | No | To see all the parameters available in the |
| object | No | To see all the parameters available in the |
| object | No | To see all the parameters available in the |
| object | No | To see all the parameters available in the |
| object | No | Define face authentication styles |
| string | No | Icon used at the top of the authentication screens |
| boolean | No | Enables or disables the timer in case of SMS and E-mail validation |
| string | No | Defines the used language on SDK's texts |
| string | No | This field only accepts strings formatted in JSON. Therefore, when submitting data to this field, the string must be in valid JSON format. |
*You must inform mobileToken when you are using facial authentication in your policy
Theme
parameters:
Theme
parameters:Field | Type | Required? | Description |
| string | No | Color used in the close button |
| string | No | Color used in the checkMark button |
| string | No | Color used in the loader button |
| string | No | Color used in the success button |
| string | No | Color used in code input |
| string | No | Color used in code input |
| string | No | Color used in the background of the timer if it is active |
| string | No | Color used in the timer text if it is active |
| string | No | Icon used in the pending context warning screen |
Label
parameters:
Label
parameters:Field | Type | Required? | Description |
| string | No | Enables or disables the |
| string | No | Redirection link |
| string | No | Text used in the |
pendingPageSettings
parameters:
pendingPageSettings
parameters:Field | Type | Required? | Description |
| string | No | Changes the icon showed when the |
| string | No | Title of the |
| string | No | Description of the |
| string | No | Text used in the |
faceLivenessSettings
parameters:
faceLivenessSettings
parameters:Field | Type | Required? | Description |
|
| No | Changes the permission button |
|
| No | Changes start button |
styles
parameters:
styles
parameters:Field | Type | Required? | Description |
| string | No | Changes text on button |
| string | No | Changes color of text on button |
| string | No | Changes color of background |
| string | No | Changes border radius |
| string | No | Changes border |
Exemple:
Calling the SDK:
To verify a user, use the verifyPolicy
method, available in the SDK instance.
You must enter the user's CPF and the policy ID to be used.
Starting from version 0.0.29, our response includes the attemptId of the attempt. This is due to the integration with the API we provide for information retrieval, which can be accessed here.
The attemptId can be returned in two ways: if isAuthorized is true, the attemptId will be included within the attestation token; if isAuthorized is false, the attemptId will be returned along with the isAuthorized field.
Please note that the attestation and attemptId fields may or may not be present in the response, depending on the executed flow.
Last updated