0.0.2 • Published 11 months ago

loui-react-native v0.0.2

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
11 months ago

loui-react-native

npm.io

Package for Loui implementation on react native.

  • 🚀 Support iOS and Android!

Installation

npm install loui-react-native

This component has a peer dependency on react-native-svg and @react-native-async-storage/async-storage to draw the countdown circle and save the information about the loui configuration. react-native-svg and @react-native-async-storage/async-storage has to be installed and linked into your project.


Usage

This component only needs 2 parameters: authConfig and activateDeviceConfig. You can check more information about this parameters below.

Component

import { TotpLoui } from 'loui-react-native';
// ...

<TotpLoui
  authConfig={authConfig}
  activateDeviceConfig={activateDeviceConfig}
/>;

// ...

Props

TotpLoui

Prop NameTypeDefaultDescription
authConfigauthPropsrequiredAuth configuration for loui
activateDeviceConfigactivateDevicePropsrequiredDevice auth configuration for loui

AuthProps

Prop NameTypeDefaultDescription
client_idstringrequiredName defined for the application
client_secretstringrequiredGenerated secret token for the application
scopestringrequiredName of the service account
usernamestringrequiredUser name of registration on Loui
passwordstringrequiredPassword of registration on Loui
grant_typestringpasswordGrant type, normally ‘password’

ActivateDeviceProps

Prop NameTypeDefaultDescription
uidstring-UID of user. Optional
usernamestringrequiredUser name of the current user
countryCodestringrequiredTelephone country code of the user. For example, +57 for Colombia
phoneNumberstringrequiredUser's phone number
emailstringrequiredUser email
reference1string-First user reference
reference2string-Second user reference
reference3string-Third user reference

License

MIT