egg-passport-wechat
Wechat passport plugin for egg.
Example
Open https://uniheart.herokuapp.com/ on your wechat browser to see the result:
- Open your wechat
- Scan the following QR Code to follow the test public account:
- And then scan the following QR Code to open the example site:
Install
$ npm i egg-passport-wechat-ts --save
Usage
// {app_root}/config/plugin.[t|j]sexportspassportWechat = enable: true package: "egg-passport-wechat-ts";
Configuration
Single instance example:
// {app_root}/config/config.default.[t|j]sexportspassportWechat = key: "your oauth key" secret: "your oauth secret";
Multiple instances example:
// {app_root}/config/config.default.[t|j]sexportspassportWechat = clients: wechat1: key: "your oauth key" secret: "your oauth secret" wechat2: key: "your oauth key" secret: "your oauth secret" ;
see config/config.default.ts for more detail.
Example
app.passport.mount"wechat", app.config.passportWechat;
Questions & Suggestions
Please open an issue here.
License
Test
npm run test-local