1.1.0 • Published 2 years ago
quickey-react-sdk v1.1.0
QuickeySDK - React.Js
A Login Management System for Application
Getting Started
npm i quickey-react-sdk
How to use
import Quickey from 'quickey-react-sdk'
const { GoogleLogin, FacebookLogin, LinkedInLogin, SmsOTPLogin } = Quickey
Get Social Login Data
Use it normally like react button component with specified props
const handleLogin = (data) => {
/**
* example data output
*
* {
email: 'your social login email',
provider: 'googleLogin',
}
*
do your logic here
*/
}
<GoogleLogin apiKey={"YOUR API KEY"} onSignIn={handleLogin} />
Or if using facebook login, you must attach facebokk App Id
<FacebookLogin facebookAppId={"YOUR FACEBOOK APP ID"} apiKey={"YOUR API KEY"} onSignIn={handleLogin} />
Get OTP Login Data
Use it normally like react button component with specified props
const handleLogin = (data) => {
/**
* example data output
*
* {
appId: 'your appId',
phone: 'your phone login number',
otp: 'your otp login code',
expires: 'your otp login code expiring time'
}
*
do your logic here
*/
}
<SmsOTPLogin apiKey={"YOUR API KEY"} phone={"YOUR PHONE NUMBER"} onSignIn={handleLogin} />