1.0.2 • Published 2 years ago
bomser-login v1.0.2
React Bomser Login
A Bomser oAUth Sign-in / Log-in Component for React
Install
npm install bomser-login
How to use
import React from 'react';
import ReactDOM from 'react-dom';
import BomserLogin from 'bomser-login';
// or
import { BomserLogin } from 'bomser-login';
const responseBomser = (response) => {
console.log(response);
};
ReactDOM.render(
<BomserLogin onSuccess={responseBomser} onFailure={responseBomser} />,
document.getElementById('BomserButton')
);
onSuccess callback
property name | value |
---|---|
key | string |
id | string |
index | number |
imageUrl | string |
firstname | string |
lasttname | string |
onFailure callback
onFailure callback is called when either initialization or a signin attempt fails.
property name | value | definition |
---|---|---|
details | string | Detailed error description |