Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
twitch-auth
Advanced tools
Utility module for handling Twitch.tv chatbot authentication. The authentication process is detailed here.
The following functions are exported by the module.
Gets a user access token required for login (using tmi.js for example). This should be used once after the initial authorization step. Subsequent logins should use the token refresh process.
creds
is an object structured as follows:
{
"client_id": <your client ID>,
"client_secret": <your client secret>
}
code
is the OAuth 2.0 authorization code returned by Twitch.
Returns a Promise that resolves to an object parsed from the JSON returned from the server, or rejects with an error. The returned object looks like this:
{
"access_token": "<user access token>",
"refresh_token": "<refresh token>",
"expires_in": <number of seconds until the token expires>,
"scope": "<your previously listed scope(s)>",
"token_type": "bearer"
}
Gets a new (refreshed) user access token for login.
creds
...same as above.
refreshToken
is the refresh_token returned from the server in calls to
getUserAccessToken() and/or
refreshUserAccessToken().
Gets an app access token. This is not applicable to chat login, but I wrote the function before I realized that :P
creds
...same as above.
FAQs
Authenticate with Twitch and stop caring about refreshing tokens.
The npm package twitch-auth receives a total of 514 weekly downloads. As such, twitch-auth popularity was classified as not popular.
We found that twitch-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.