1.1.1 • Published 2 years ago

quickey-node-sdk v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

QuickeySDK - Node.js

A Login Management System for Application

Getting Started

npm i quickey-node-sdk

How to use

const { QuickeySDK } = require('quickey-node-sdk')

Get App Metadata

const quickey = new QuickeySDK('your api Key')

quickey.app.getMetaData()
.then(app => {
    /** 
     * example app output
     * 
     * {
            appId: 'your app id',
            userEmail: 'your app email',
            appName: 'your app name',
            redirectUri: 'your app redirect uri callback',
            redirectUrlApp: 'your app redirect login'
        } 
     * 
     */
})
.catch(err => {
    console.log(err);
})

Get Access Token via social login

quickey.auth.getAccessToken({
    email: 'your email login',
    provider: 'your social login app provider',  googleLogin | facebookLogin | linkedInLogin
})
.then(result => {
    /**
        * result is access token taken from quickey that willl be sent to app's client side
    */
    console.log(result);
})
.catch(err => {
     console.log(err);
})

Get Access Token via otp login

quickey.auth.getAccessToken({
    email: 'your phone number login',
    provider: 'your phone number login app provider',  smsOTP | waOTP
    otpCode: 'your OTP Code login'
})
.then(result => {
    /**
        * result is access token taken from quickey that willl be sent to app's client side
    */
    console.log(result);
})
.catch(err => {
     console.log(err);
})

Get OTP Code via sms OTP login

quickey.app.sendSMSOTP({
    phone: 'your phone number',
    provider: 'your otp provider', smsOTP | waOTP
})
.then(result => {
    /**
        * result is one time password number taken from quickey that willl be sent to app's client side
    */
    console.log(result);
})
.catch(err => {
    console.log(err);
})

link Phone Number to Email

return quickey.auth.linkPhoneToEmail({
    phone: 'your phone number',
    provider: 'your access token'
})
.then(result => {
    /**
        * result is customer data which include email and/or phone with its social/otp apps listed
    */
    console.log(result);
})
.catch(err => {
    console.log(err);
})

Set Error SDK

const { QuickeySDKError } = require('quickey-node-sdk')

const apiError = QuickeySDKError.createApiKeyError()
const emailError = QuickeySDKError.createEmailError()
1.1.1

2 years ago

1.1.0

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago