Twurple - Extension auth provider
This is an {@link AuthProvider} implementation for the twurple
package family
that will use the token provided to your Extension by Twitch.
Installation
To add this library to your project, just execute:
yarn add @twurple/auth-ext
or using npm:
npm install @twurple/auth-ext
Basic usage
To instantiate an {@link ApiClient} with this auth provider, just pass it to its constructor:
import { ApiClient } from '@twurple/api';
import { ExtensionAuthProvider } from '@twurple/auth-ext';
const clientId = 'abc123';
const authProvider = new ExtensionAuthProvider(clientId);
const client = new ApiClient({
authProvider
});
If you're getting stuck...
You can join the Twitch API Libraries Discord Server and ask in #twurple
for support.