# twinstage-client

> twinstage npm for client side frameworks

Latest version **0.1.4** (published 2018-01-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install twinstage-client
pnpm add twinstage-client
yarn add twinstage-client
bun add twinstage-client
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2018-01-16 |
| First published | 2018-01-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | johnfliu |

## Links

- npm: https://www.npmjs.com/package/twinstage-client
- Repository: https://github.com/karmadata/twinstage-client
- Homepage: https://github.com/karmadata/twinstage-client#readme
- Issues: https://github.com/karmadata/twinstage-client/issues
- npm.io page: https://npm.io/package/twinstage-client

## Dependencies (1)

- [reqwest](https://npm.io/package/reqwest.md) ^2.0.5

## Recent versions

- 0.1.4 (latest) — 2018-01-16
- 0.1.3 — 2018-01-16
- 0.1.2 — 2018-01-16
- 0.1.1 — 2018-01-16
- 0.1.0 — 2018-01-16

## README

# twinstage-client
twinstage npm package for client side frameworks

# Usage

```js
const ClientCredentialsProcess = require('twinstage-client').ClientCredentialsProcess;

let options = {
  authorization_url: env.TWINSTAGE_AUTHORIZATION_URL,
  client_id: env.TWINSTAGE_CLIENT_ID,
  client_secret: env.TWINSTAGE_CLIENT_SECRET,
  fetch_interval: 600   // every 10 minutes
};

async function main() {
  // create an instance of ClientCredentialsProcess and start
  // the background process
  let process = new ClientCredentialsProcess(options);
  process.start();

  // the access token would be available as a promise and can be requested as often as needed
  let accessToken = await process.waitToken();
}
```

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