Go to file
Fisheiyy 28d933c514 html 2022-02-14 00:52:13 -06:00
node_modules Initial commit 2022-02-10 01:28:21 -06:00
views html 2022-02-14 00:52:13 -06:00
.gitattributes Initial commit 2022-02-10 01:28:21 -06:00
README.md Initial commit 2022-02-10 01:28:21 -06:00
app.js logout fixes 2022-02-12 16:27:40 -06:00
config.json Update config.json 2022-02-10 16:46:03 -06:00
package-lock.json Initial commit 2022-02-10 01:28:21 -06:00
package.json Initial commit 2022-02-10 01:28:21 -06:00

README.md

express-discord-oauth2

An example on how to use Discord's OAuth2 in Node.js using Express

Instalation

  1. Install Node.JS here
  2. To install the dependencies, run npm install

Configuration

  • port: The port the website will use

  • oauth2:

    • redirect_uri: URI that you'll be redirected after Discord authorization
    • client_id: Your Discord application ID
    • client_secret: Your Discord application secret
    • scopes: Scopes that will be requested

    Discord's OAuth2 API docs: https://discord.com/developers/docs/topics/oauth2

    • cookie:
      • maxAge: Max age of cookies in milliseconds

You can read about Discord's OAuth2 API here