Javascript
Integrating verisync SDK into your javascript application
Installation
npm install verisync-js
---- OR -----
yarn add verisync-jsUsage
Configuration (VerisyncConfig)
VerisyncConfig)To use the Verisync class, you must first configure it with a VerisyncConfig object. This object contains essential information required for the verification process.
Properties
client_id (required)
Type:
stringDescription: A unique identifier for the client using the Verisync service. It is essential for the Verisync backend to recognize the incoming request and process it accordingly.
flow_id (required)
Type:
stringDescription: Identifies the specific verification flow to be initiated. Different
flowIdvalues can represent different types of verification processes tailored to various requirements.
redirect_url (required)
Type:
stringDescription: The URL to which the user will be redirected once the verification process is completed.
metadata (optional)
Type:
stringDescription: An object that can include additional information relevant to the verification process. This metadata is sent to Verisync's server for processing and can be used to pass any extra details required for verification.
Methods
verify(email: string)
Initiates the verification process for the given email address.
email: The email address to be verified.
This method constructs a URL with the necessary parameters and redirects the user to Verisync's verification service. Upon completion of the verification process, the user is redirected back to the redirect_url specified in the configuration.
Last updated