Simple Node Auth Backend #4 - Login Auth Middleware (JWT)

preview_player
Показать описание
In this part #4, we set up a node js authentication/authorization middleware for enforcing login. Providing or limiting access to resources based on provided access token (JWT).
GET SOURCE CODE 📀⬇️

NOTES

🔵 In this video series, we look at how to create a simple & clean node js authentication and authorization backend using mongoDB and JWT.

LET’S WORK

CHECK OUT THESE HELPFUL TUTORIALS

🟡 Publishing Expo React Native App to Play Store Journey

🟡 PHP Project

TOOLS USED

FOLLOW US ON:

CHAPTERS

00:00 What will be done | Concept
00:46 Auth Middleware Setup (JWT)
01:25 Receiving the Token
02:08 Verifying the Token
03:19 Applying the Auth Middleware
04:01 Sending Request with Token

#tothepointcode #nodejs #jwt
Рекомендации по теме
Комментарии
Автор

Thank you for this video, please I am having issue with the middleware

Error:
const token = req.body.token || req.query.token ||
TypeError: Cannot read properties of undefined (reading 'token')

Even when I pass token in the body, same issue. The body is not getting to the middleware and keeps returning empty

desmondawere
Автор

Straight to the Point Series 👌👌, what Vscode Theme are you using??

gubi