Adding Discord OAuth2 to Your Application

Published: 29 December 2022
on channel: Robin Vriens
30,100
438

In this video, I will demonstrate how to integrate Discord OAuth2 into a Node.js application.

Discord Developer Portal:   / discord  
Github repository: https://github.com/robinvriens/discor...

Instagram:   / robinvriens  
Github: https://github.com/robinvriens
Twitter:   / robinvriens  

Chapters:
0:00 intro
0:14 Creating a new Application
0:59 Open an existing application
1:24 Creating an .env file
2:15 Installing the dependencies
2:52 Creating the login endpoint
3:54 Creating the callback endpoint
4:55 POST request to retrieve the access_token from discord
7:54 GET request to retrieve the user information
8:48 Insert and update the user in the database
10:02 Signing token with JWT
11:11 Set a cooke with the token included
11:49 Testing if the cookie is set
12:23 Decoding JWT token
12:47 Creating middleware for authenticating the user
15:21 Verifying the token with JWT
15:52 Setting the user state
16:49 Sharing cookie between client and server


Watch video Adding Discord OAuth2 to Your Application online without registration, duration hours minute second in high quality. This video was added by user Robin Vriens 29 December 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 30,100 once and liked it 438 people.