npm.io
1.2.8 • Published 4 years ago

twitchlib-auth

Licence
MIT
Version
1.2.8
Deps
1
Size
23 kB
Vulns
23
Weekly
0

Twitchlib Authentication npm

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

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

Keywords