Implementation of Discord OAuth2 API. Consists of HTML/Vanilla.js frontend and Express.js backend. Allows to login using Discord account.
Complementary repository to Medium article: https://levelup.gitconnected.com/create-login-with-discord-in-express-js-in-10-minutes-6eaeab4ba174
- Node.js v16<=
- npm/yarn
- Create Discord OAuth2 Application with redirect in Discord Developer Portal
- Fill
backend/.env
based onbackend/.env.example
- Fill
frontend/index.html
with generated OAuth URL in "Discord Login" button href (line 14) - Install and run backend
cd backend
npm i
node app.js
- Visit http://localhost:3000
More details in the Medium article: https://levelup.gitconnected.com/create-login-with-discord-in-express-js-in-10-minutes-6eaeab4ba174