Disco-OAuth

Prerequisite knowledge


Before you get started, you are expected to have decent knowledge of the following technologies: -

Installation


You can very easily get started with disco-oauth by simply installing it using any of your preferred NodeJS package managers.

NPM

npm install --save disco-oauth

Yarn

yarn add disco-oauth

You can also use disco-oauth/disco-oauth instead of just disco-oauth to install the latest under-development version of the library from GitHub.

Usage


Now that the library is installed, you can use it by simply importing it to your app and creating an instance of the Client class.

const OAuthClient = require('disco-oauth');
const client = new OAuthClient('my-discord-client-id', 'my-discord-client-secret');

Normally, you would want to keep your client secret hidden from others. For this, it would be best to store it among the environment variables and access it using process.env.


You are now ready to use the library. Click here to learn more.