npm.io
1.1.0 • Published 4 years ago

quickey-react-sdk

Licence
ISC
Version
1.1.0
Deps
1
Size
103 kB
Vulns
0
Weekly
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} />

Keywords