1.0.4 • Published 5 years ago

vk-apps-sdk v1.0.4

Weekly downloads
29
License
MIT
Repository
github
Last release
5 years ago

VK Apps SDK

Nodejs SDK for VK Apps service's backend

Install

npm i vk-apps-sdk -s

Examples

const PORT = process.env.PORT || 3000
const express = require('express')
const app = express()

const VKAppsSDK = require('vk-apps-sdk')
const VKApp = new VKAppsSDK({
    CLIENT_SECRET: 'okM7c8C1V7wbe3eCFqK7'
})


app.use( (req, res, next) => {
    req.auth = VKApp.checkVKQueryParamsSign(req.body)
    next()
})

app.all( (req, res) => {
    req.json({
        auth: req.auth
    })
})

app.listen(PORT)

Methods

.checkVKQueryParamsSign(params)

Checks VK Apps query params signature

.checkVKPaySignature(data_str, signature)

Checks VK Pay signature for base64 encoded data string

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago