borders/README.md

22 lines
742 B
Markdown
Raw Normal View History

2022-02-10 07:28:21 +00:00
# express-discord-oauth2
An example on how to use Discord's OAuth2 in Node.js using Express
## Instalation
1. Install Node.JS [here](https://nodejs.org/)
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](https://discord.dev/topics/oauth2)