0.0.2 • Published 11 months ago
loui-react-native v0.0.2
loui-react-native
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 Name | Type | Default | Description |
---|---|---|---|
authConfig | authProps | required | Auth configuration for loui |
activateDeviceConfig | activateDeviceProps | required | Device auth configuration for loui |
AuthProps
Prop Name | Type | Default | Description |
---|---|---|---|
client_id | string | required | Name defined for the application |
client_secret | string | required | Generated secret token for the application |
scope | string | required | Name of the service account |
username | string | required | User name of registration on Loui |
password | string | required | Password of registration on Loui |
grant_type | string | password | Grant type, normally ‘password’ |
ActivateDeviceProps
Prop Name | Type | Default | Description |
---|---|---|---|
uid | string | - | UID of user. Optional |
username | string | required | User name of the current user |
countryCode | string | required | Telephone country code of the user. For example, +57 for Colombia |
phoneNumber | string | required | User's phone number |
string | required | User email | |
reference1 | string | - | First user reference |
reference2 | string | - | Second user reference |
reference3 | string | - | Third user reference |
License
MIT