wx-oauth

1.1.6 • Public • Published

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)))

Readme

Keywords

Package Sidebar

Install

npm i wx-oauth

Weekly Downloads

9

Version

1.1.6

License

ISC

Last publish

Collaborators

  • liuguili