Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

How to Authorize User Roles and Permissions - Node.js & Express Authorization Tutorial

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial shows how to distinguish authentication from authorization and implement role-based permissions in a Node.js and Express REST API. It configures user roles, adds them to JWT access tokens, and protects routes with custom middleware.

Syllabus

Intro
Welcome
Authentication vs Authorization
Configure the User Roles
Add roles to the user data model
Add a user role at registration
Add user roles to access token at authentication
Add user roles to access token when refreshed
Update the verifyJWT middleware to include roles
Create the verifyRoles middleware
Add the verifyRoles middleware to routes
Test routes with Thunder Client
A quick note on Thunder Client

Taught by

Dave Gray

Reviews

Start your review of How to Authorize User Roles and Permissions - Node.js & Express Authorization Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.