xhc-auth

小红唇微信登陆验证模块 =====================

Usage no npm install needed!

<script type="module">
  import xhcAuth from 'https://cdn.skypack.dev/xhc-auth';
</script>

README

小红唇微信登陆验证模块

Install

Install with npm

npm install xhc-auth

用法

import { login } from 'xhc-auth'

const loginMiddleware = login({
    appid: Weixin.appid,
    baseURL: Sites.napi
})

router.get('/', loginMiddleware, async (ctx: BaseContext) => {
    ctx.status = 200
    await app.render(ctx.req, ctx.res, '/index', ctx.query)
    ctx.respond = false
})