New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

twitch-oauth-authorization-code-express

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-oauth-authorization-code-express

Small library to get a Twitch OAuth code using the OAuth authorization code flow.

2.2.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Twitch OAuth Authorization Code Express

This module has code that provides an easily configurable method to set up an OAuth endpoint, as described here.

This module also provides a method to refresh using the refresh token.

See src/test.ts for an example of how to use this library.

Testing

To run the test code, first clone this repo.

Install TypeScript (npm i -g typescript).

Copy config.example.env; fill it with the required details (secret, client id, and the session secret, and redirect uri).

Install required packages (npm install).

Build the test script, as well as the library (npm run build-test)

Run the test script (npm run test).

Connect on localhost:3000 to test the authentication flow.

After you get an access token, you can connect to localhost:3000/refresh to refresh the OAuth token.

Keywords

Twitch

FAQs

Package last updated on 25 Nov 2020

Did you know?

Socket

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.

Install

Related posts