# wechat-component-service

> Wechat component service

Latest version **1.0.1** (published 2017-12-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install wechat-component-service
pnpm add wechat-component-service
yarn add wechat-component-service
bun add wechat-component-service
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-26 |
| First published | 2017-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lin Lou |
| Maintainers | loulin |
| Keywords | wechat, wechat component service, wechat-api, wechat-oauth, passport-wechat |

## Links

- npm: https://www.npmjs.com/package/wechat-component-service
- Repository: https://github.com/loulin/wechat-component-service
- Homepage: https://github.com/loulin/wechat-component-service#readme
- Issues: https://github.com/loulin/wechat-component-service/issues
- npm.io page: https://npm.io/package/wechat-component-service

## Dependencies (9)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [ioredis](https://npm.io/package/ioredis.md) ^3.2.2
- [redlock](https://npm.io/package/redlock.md) ^3.1.0
- [wechat-api](https://npm.io/package/wechat-api.md) ^1.35.1
- [wechat-oauth](https://npm.io/package/wechat-oauth.md) ^1.2.1
- [cache-manager](https://npm.io/package/cache-manager.md) ^2.6.0
- [passport-wechat](https://npm.io/package/passport-wechat.md) ^2.0.4
- [wechat-component](https://npm.io/package/wechat-component.md) 2.0.0
- [cache-manager-ioredis](https://npm.io/package/cache-manager-ioredis.md) ^1.0.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-12-26
- 1.0.0 — 2017-12-26

## README

# wechat-component-service

## Basic Usage

```js
const ComponentService = require('wechat-component-service');

const service = new ComponentService({
  appid: '<WECHAT_COMPONENT_APPID>',
  token: '<WECHAT_COMPONENT_TOKEN>',
  appsecret: '<WECHAT_COMPONENT_APPSECRET>',
}, {
  // optional, default redis options for cache manager & redlock (in fact ioredis)
  client: { host: 'locahost', port: '6379', },
});

const component = service.getComponent(); // wechat component instance
const api = service.api(authorizerAppid); // wechat-api wrapper
const oauth = service.oauth(authorizerAppid); // wechat-oauth wrapper
const strategy = service.oauth(authorizerAppid); // passport-wechat wrapper
```

---
_Source: https://npm.io/package/wechat-component-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
