@authid/react-component

1.4.0 • Public • Published

authID integration as a React.js Component

This authID React.js Component provides a convenient integration overlay. The overlay hovers over your website in desktop environment and occupies maximum space in mobile environment.

This integration uses @authid/web-component package.

Integration

The plugin is not preprocessed with Babel intentionally. Please make sure your Webpack or other build tool configuration handles translation of node_modules/@authid/*.js modules.

React.js with hooks is a peer dependency.

API

  • AuthIDComponent - a React.js component with the following properties:
    • url - required parameter with operation/transaction URL received from authID,
    • target - force selection of either mobile or desktop integration variant, auto is the default,
    • webauth=true - enable automatic handling of WebAuth features,
    • control=(msg, authidControlFace) => {} - enable advanced control features with a special callback.

Example

Please see example.jsx and example.html for full details.

Note: you will need to install development dependencies and build example.min.js first.

import AuthIDComponent from '@authid/react-component';

const App = () => {
    return <AuthIDComponent url="https://id.authid.ai/?...." />;
};

Package Sidebar

Install

npm i @authid/react-component

Weekly Downloads

50

Version

1.4.0

License

Apache-2.0

Unpacked Size

19.1 kB

Total Files

8

Last publish

Collaborators

  • mikeryan
  • authid_andrey
  • chriswhite72