Skip to content

Link33d/LoginWithDiscord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord oauth2 sample site

This is just a basic site to help people log in with discord! Below you will find instructions on how to use! this site is not meant to be big or pretty, it's just for you to learn the basics.

Setup

configuring file

Go to the config.js file and fill in the information:

module.exports = {
    "dashboard_url": "http://localhost:8000",
    "redirect_uri": "/login/callback",
    "client_id": "<client id>",
    "cookie_name": "client"
}

create the .env file and fill in the information:

TOKEN=<clientToken>
SECRET=<clientSecret>

How do you do this?

Configuring the redirect URL

Add your dashboard_url and redirect_uri to the oauth tab of the discord panel.

How do you do this?

I'm using the example template, it's your choice, but it needs to be the same one added to the discord panel in the oauth2 tab

Install and Run

  • npm i - install all packages
  • npm start - simples node execution
  • npm run dev - node running with nodemon

How do you do this

client_id

In the Developer Portal -> Your Application -> General Information image

client_secret

In the Developer Portal -> Your Application -> Oauth2 image

client_token

In the Developer Portal -> Your Application -> Bot image

redirect

In the Developer Portal -> Your Application -> Oauth2 -> Add Another -> text box -> Save Changes image

About

Tutorial: How to Implement OAuth2 Login with Discord!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published