@verifai/websdk-react

2.16.1 • Public • Published

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.

Package Sidebar

Install

npm i @verifai/websdk-react

Weekly Downloads

71

Version

2.16.1

License

No License

Unpacked Size

2.88 MB

Total Files

5

Last publish

Collaborators

  • sidjakinsboriss
  • mbreemhaar
  • verifai-dev
  • edpasagic
  • systeembeheer
  • jellevanwezel