Socket
Socket
Sign inDemoInstall

twitch-oauth-authorization-code-express

Package Overview
Dependencies
80
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
5
Maintainers
1
Install size
3.51 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 25 Nov 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc