Skip to content

NOCELL/vk-apps-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

SDK for VK Apps backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published