wx-oauth

v1.1.6
sign with wechat, support open platform & media(public) platform
wechat auth oauth wx

wx_oauth

Get wechat userinfo and set koa context variable named _wechat_userinfo

Config

appid: {your appid}
appsecret: {your appsecret}

Usage

  const koa = require('koa')
  const wxOauth = require('wx-oauth')
  const app = koa()

  app.use(wxOauth({}, function() {
    const userinfo = this._wechat_userinfo

    // there handle wechat userinfo

  }))

Use koa-router

router.get('/signin', convert(wxOauth({ wechat config }, callback)))
npm i wx-oauth

Metadata

  • ISC
  • Whatever
  • LiuGuili
  • released 8/10/2017

Downloads

Maintainers