# twitchlib-auth

> A twitch library that provides various authentication methods

Latest version **1.2.8** (published 2022-01-15) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.8 |
| Published | 2022-01-15 |
| First published | 2021-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 23.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Dylan Zemlin |
| Maintainers | dylansmr |
| Keywords | twitch, auth, bot, chat, authentication |

## Links

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

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.24.0

## Alternatives

- [@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
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 1.2.8 (latest) — 2022-01-15
- 1.2.7 — 2022-01-15
- 1.2.65 — 2022-01-10
- 1.2.64 — 2022-01-10
- 1.2.63 — 2022-01-10
- 1.2.62 — 2022-01-10
- 1.2.61 — 2022-01-10
- 1.2.6 — 2022-01-10
- 1.2.5 — 2022-01-10
- 1.2.4 — 2021-12-28
- 1.2.3 — 2021-12-28
- 1.2.2 — 2021-12-28
- 1.2.1 — 2021-12-25
- 1.2.0 — 2021-12-25

## README

# Twitchlib Authentication ![npm](https://img.shields.io/npm/v/twitchlib-auth)

A twitch authentication library that provides various means of handling auth tokens

## Install

```
npm install twitchlib-auth
```

## Usage

### Static Auth Provider

A static auth provider is one that only uses a access token

```typescript
import { StaticAuthProvider, IProvider } from "twitchlib-auth";

const provider: IProvider = new StaticAuthProvider("token");
provider.getTokenInfo().then((token) => {
    console.log(token);
}).catch((err) => {
    console.log(err);
});
```

### Refreshing Auth Provider

A refreshing auth provider takes in a refresh token and optionally other information to generate *refreshing* auth tokens

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