egg-passport-wechat-ts
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    egg-passport-wechat

    Wechat passport plugin for egg.

    NPM version Build Status codecov David deps Known Vulnerabilities npm download

    Example

    Open https://uniheart.herokuapp.com/ on your wechat browser to see the result:

    1. Open your wechat
    2. Scan the following QR Code to follow the test public account:
    3. 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]s
    exports.passportWechat = {
      enable: true,
      package: "egg-passport-wechat-ts"
    };

    Configuration

    Single instance example:

    // {app_root}/config/config.default.[t|j]s
    exports.passportWechat = {
      key: "your oauth key",
      secret: "your oauth secret"
    };

    Multiple instances example:

    // {app_root}/config/config.default.[t|j]s
    exports.passportWechat = {
      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

    MIT

    Test

    npm run test-local

    Release Notes:

    Install

    npm i egg-passport-wechat-ts

    DownloadsWeekly Downloads

    2

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    10.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • jeff-tian