@verifai/websdk-react
v2.16.1
Published
Verifai Web SDK
Downloads
96
Readme
Verifai WebSDK for React
Install
# with npm
npm install @verifai/websdk-react --save
# or with yarn
yarn add @verifai/websdk-react
Usage
import React, { useState } from "react"
import WebSDK from '@verifai/websdk-react'
export default function MyComponent() {
const [show, setShow] = useState(true)
return <WebSDK
// For the token look at: https://docs.verifai.com/sdk/web/
token="<OTP_TOKEN>"
show={show} // you can manipulate the show prop to show and hide the modal.
onSuccess={sessionID => {
// set show prop to false, to close the modal
setShow(false)
// Here you can get the Verifai result.
// And also clear the Verifai session.
}}
onCanceled={sessionID => {
// set show prop to false, to close the modal
setShow(false)
// Here your customer canceled the Verifai flow
// And you can clear the Verifai session
}}
/>
}
More Documentation
For more configuration and options you can see the documentation.
Demo
Want to try it out first? There is a demo available at: demo.websdk.verifai.com.
About Verifai
Please visit our website for more information about this and our other products: verifai.com.