0.0.14 • Published 3 years ago
@shareid/authenticate_desktop v0.0.14
Shareid web desktop authenticate
A component for authenticate.
Install
npm install --save @shareid/authenticate_desktopor
yarn add @shareid/authenticate_desktopUsage
import React from "react";
import { Authenticate } from "@shareid/authenticate_desktop";
const App = () => (
<View>
<Authenticate
accessToken="YOUR TOKEN HERE"
uuid="USER UUID HERE"
language="fr"
onFail={ (data: object) => { /*any side effect here*/ }}
onSuccess={ (data: object) => { /*any side effect here*/ }}
environment='staging'
/>
</View>
);
export default App;Props
| Name | Description | Type | Required | Default Value |
|---|---|---|---|---|
| accessToken | The token you get through the authentication process | string | ✓ | |
| uuid | your client/user id for this verification request | string | ✓ | |
| language | default en | string | en | |
| onFail | callback function when the verification fails | func | ||
| onSuccess | callback function when the verification suceeds | func | false | |
| environment | default production | string | production |
FAQ
what callack data sdk returns ?
onFail
type data = {
error_code: number, // 0 | 1 | 2 | 3
message: string // eg: "User not authenticated"
}onSuccess
type data = {
success: true,
message: string // eg: "User authenticated successfully"
}Author
Shareid
License
MIT