twitchlib-auth
v1.2.8
Published
A twitch library that provides various authentication methods
Downloads
11
Maintainers
Readme
Twitchlib Authentication
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