Skip to main content
CF

JSON Web Token (JWT) Authentication with Node.js

32m 33s
English
Paid

JSON Web Token (JWT) is a low overhead option for authentication that is easy to implement and scales with your application. There is no need to store session data as everything you need is stored in an encoded string sent in the JWT, significantly reducing database overhead for your servers. In this course, we will build a simple authentication server that will act as a token issuer, and we will use those tokens to access resources on an API. 

Starting from scratch, you will learn how easy token based authentication can be and will understand how to use them on your APIs as well as on the front end of your web applications.

About the Author: egghead.io

egghead.io thumbnail

egghead.io is a US-based subscription video platform focused on short, focused screencasts on JavaScript ecosystem topics. Founded in 2012 by John Lindquist (a Google Developer Expert) and run by Joel Hooks, egghead pioneered the short-screencast format that most modern developer-education platforms now use — courses are typically broken into 2-5 minute lessons that each cover one specific concept or API.

The instructor roster includes many of the most cited names in the JavaScript ecosystem — Kent C. Dodds (whose Testing JavaScript launched on egghead before EpicWeb.dev), Andrew Del Prete, Hannah Davis, Lukas Ruebbelke, Tomasz Łakomy, Andy Van Slaars, and many others. Course material covers React, Next.js, TypeScript, Node.js, GraphQL, Vue, the testing tracks, RxJS / observables, and a long list of smaller libraries and tools.

The CourseFlix listing under this source carries over 20 egghead courses spanning that range. Material is paid; egghead itself runs on a monthly / annual subscription on the original platform. The bite-sized format suits developers learning incrementally during work hours rather than committing to multi-hour video sessions.

Watch Online 9 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 9 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Course Overview: JSON Web Token (JWT) Authentication with Node.js
All Course Lessons (9)
#Lesson TitleDurationAccess
1
Course Overview: JSON Web Token (JWT) Authentication with Node.js Demo
01:56
2
Setup a Web Server in Node.js using Express
02:23
3
Set the Server Port in Express Using Environment Variables
00:53
4
Add a POST Route To Express And Parse the Body
01:53
5
Provide Users With A JSON Web Token
04:35
6
Allow CORS in Node.js and Express
00:56
7
Authenticate Users With JWT for Access to Protected Resources
03:00
8
Connect a Front-End to a Secure API using JWTs
07:17
9
Authenticate Users in a Single Page Application with Auth0
09:40
Unlock unlimited learning

Get instant access to all 8 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for taking this course?
The course assumes a basic understanding of Node.js and Express, as it involves setting up a web server and creating routes. Familiarity with handling HTTP requests and environment variables will be beneficial. No prior experience with JSON Web Tokens is required.
What will I build by the end of the course?
By the end of the course, you will have built a simple authentication server that issues JSON Web Tokens. You'll also learn how to use these tokens to access resources on an API. The course includes practical implementation of token issuance and user authentication.
Who is the target audience for this course?
This course is suitable for developers interested in implementing authentication mechanisms in their applications using JSON Web Tokens. It's ideal for those looking to reduce database overhead and improve scalability in their projects.
What specific tools or platforms does the course use?
The course focuses on Node.js and Express for setting up web servers and handling requests. It also covers the use of Auth0 for user authentication in a single-page application and discusses enabling CORS in Node.js applications.
How does the course compare to similar courses?
This course offers a focused approach to implementing JWT authentication using Node.js and Express. Unlike broader courses on authentication, it specifically addresses JWTs, providing a practical guide on integrating token-based authentication in applications.
What topics are not covered in this course?
The course does not cover advanced security measures like token encryption or complex authorization systems. It provides a foundational understanding of JWTs but does not delve into other authentication methods such as OAuth or SAML.
How can the skills learned in this course benefit my career?
Understanding JWT authentication is valuable for developers working on scalable applications where session management is crucial. The skills gained can be applied to improve security and performance in web applications, making you a more versatile developer in the field of web security.