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 eithermobile
ordesktop
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/?...." />;
};