Twitch OAuth
Authenticate users with Twitch.
💻 Getting started
# With npm:
npm install twitch-oauth
# With yarn:
yarn add twitch-oauth
📚 Usage
As a ES Module
import { TwitchOAuth } from 'twitch-oauth';
const client = new TwitchOAuth({
clientId: '..............',
clientSecret: '..........',
redirectUri: '...........',
scope: [
"user:read:email",
"......"
],
method: "code"
});
client.authenticate();
client.verifyCodeResponse(code: string)
.then(console.log);
client.validate(access_token: string);
client.refresh(refresh_token: string);
As CJS Module
const { TwitchOAuth } = require('twitch-oauth').default;
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
❤️ Show your support
Give a ⭐️ if this project helped you!
Or buy me a coffeelatte 🙌🏾
Ko-fi | Patreon
📝 License
Copyright © 2022 Sammwy.
This project is MIT licensed.