# yuque-auth

> yuque 非 web 授权插件

Latest version **1.0.0** (published 2019-06-12) · 0 weekly downloads

## Install

```sh
npm install yuque-auth
pnpm add yuque-auth
yarn add yuque-auth
bun add yuque-auth
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-12 |
| First published | 2019-06-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | dead_horse |

## Links

- npm: https://www.npmjs.com/package/yuque-auth
- Repository: https://github.com/yuque/auth
- Homepage: https://github.com/yuque/auth#readme
- Issues: https://github.com/yuque/auth/issues
- npm.io page: https://npm.io/package/yuque-auth

## Dependencies (3)

- [opn](https://npm.io/package/opn.md) ^5.3.0
- [urllib](https://npm.io/package/urllib.md) ^2.28.1
- [utility](https://npm.io/package/utility.md) ^1.13.1

## Recent versions

- 1.0.0 (latest) — 2019-06-12

## README

## yuque-auth

语雀第三方应用的客户端鉴权客户端。

### install

```bash
tnpm install yuque-auth
```

### Usage

```js
const { auth } = require('yuque-auth');

auth({
  // clientId 和 clientSevret在 oauth 应用中可查到
  clientId,
  clientSecret,
  scope: 'repo,doc',
}).then(res => {
  console.log('get auth', res);
  //{ access_token: 'Y1iwvwUPI4M67VjWRGHAzgq7gzB4a21EV3jOhyFf', token_type: 'bearer', scope: 'repo,doc' }
}).catch(err => {
  console.log('error happend', err.stack);
});
```

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