koa-wechat-signature
v1.0.1
Published
koa2 微信公众号接入验证插件
Downloads
3
Maintainers
Readme
HOW TO USE
const { wechatSignature }= require('koa-wechat-signature')
app.use(wechatSignature({
token, // YOUR TOKEN
path //YOUR PATH . Default '/'
}))
NOW USE
app.use(async (ctx, next) => {
// when valid success, the echostr key will be in ctx.request.wechat
if (ctx.method === 'GET') {
ctx.body = ctx.request.wechat.echostr || false
}
})