@verifai/websdk-react

Verifai Web SDK

Usage no npm install needed!

<script type="module">
  import verifaiWebsdkReact from 'https://cdn.skypack.dev/@verifai/websdk-react';
</script>

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/web-sdk
    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 clear the temperal storage
    }}
    onCanceled={sessionID => {
      // set show prop to false, to close the modal
      setShow(false)

      // Here your customer canceled the Verifai flow
      // And clear the temperal storage

    }}
  />

}


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.