Skip to content
Berbix React SDK for rendering the Berbix Verify flow
JavaScript Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Updating Berbix React SDK version to 0.0.5 Aug 1, 2019
.babelrc Use babel preset for builds. May 13, 2019
.gitignore
README.md Add template key to react SDK. Jul 23, 2019
package-lock.json Use babel preset for builds. May 13, 2019
package.json Updating Berbix React SDK version to 0.0.5 Aug 1, 2019
release.sh Bump version, set height on error and set referrerPolicy. Aug 1, 2019
version Bump version, set height on error and set referrerPolicy. Aug 1, 2019

README.md

Berbix React SDK

This Berbix React library provides simple interfaces to interact with the Berbix Verify flow.

Installation

npm install berbix-react

Usage

Basic usage

import React from 'react';
import BerbixVerify from 'berbix-react';

class ExampleComponent extends React.Component {
  render() {
    return (
      <BerbixVerify
        clientId="your_client_id"
        templateKey="your_template_key"
        onComplete={event => {
          // send event.value to backend to fetch user verification data
        }}
      />
    );
  }
}

PropTypes

BerbixVerify.propTypes = {
  // Required
  clientId: PropTypes.string.isRequired,

  // Configurations
  templateKey: PropTypes.string,
  clientToken: PropTypes.string,
  email: PropTypes.string,
  phone: PropTypes.string,

  // Event handlers
  onComplete: PropTypes.func.isRequired,
  onError: PropTypes.func,
  onDisplay: PropTypes.func,
  onStateChange: PropTypes.func,
}

Publishing

# Update the version in package.json
npm run build
npm publish
You can’t perform that action at this time.