0.0.14 • Published 1 year ago

@shareid/authenticate_desktop v0.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Shareid web desktop authenticate

A component for authenticate.

Install

npm install --save @shareid/authenticate_desktop

or

yarn add @shareid/authenticate_desktop

Usage

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

NameDescriptionTypeRequiredDefault Value
accessTokenThe token you get through the authentication processstring
uuidyour client/user id for this verification requeststring
languagedefault enstringen
onFailcallback function when the verification failsfunc
onSuccesscallback function when the verification suceedsfuncfalse
environmentdefault productionstringproduction

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