A discord OAuth code example built-in react typescript

Discord Oauth2 Example

The methods was taken from Dank Memer Rewrite Website but this code is simplified only for the oauth2 codes. The design is completlely different , just the methods.

.env

COOKIE_SECRET= COOKIE_SECRET
CLIENT_ID= DISCORD CLIENT ID
CLIENT_SECRET= DISCORD CLIENT SECRET
CRYPT_KEYS= Array of crypt keys [2]
DOMAIN=http://localhost:3000 // Or the website domain
MONGODB_URI= MONGODB URI
MONGODB_DB= MONGODB COLLECTION NAME < ANY NAME >
REDIS_PORT=6379
REDIS_HOST=localhost
  • Generating CRYPT_KEYS =
node -p "[ 32, 16 ].map(n => crypto.randomBytes(n).toString('base64'))"
  • Cookie Secret ( At leat 32 characters long. )

1password.com

Written By

UnusualAbsurd

Method Authors

  • RoninInitial workTheCyberRonin
  • MelInitial designMelmsie
  • AetheryxBasically the whole thingAetheryx
  • InBlueTaken over work for redesignInBlue
  • BadoszRewrite and feedback pagebadosz0