Build A Node.js API Authentication With JWT Tutorial

Build A Node.js API Authentication With JWT Tutorial

In this Node.js tutorial, you'll learn how to build a Node.js API Authentication With JWT. We are going to create a node.js api that is going to handle Authentication for us in any application we want to use it in. We are going to cover an authentication method using jwt. We will use mongodb as our database, mongoose to create models and to connect to our express server, bcryptjs to hash passwords and jwt to check for private routes.

In this episode we are going to create a node.js api that is going to handle Authentication for us in any application we want to use it in.

We are going to cover an authentication method using jwt. We will use mongodb as our database, mongoose to create models and to connect to our express server, bcryptjs to hash passwords and jwt to check for private routes.

📕 Things covered in this video:

  • 00:00:57 Introduction
  • 00:02:32 Setting up express
  • 00:08:12 Connecting to a database
  • 00:14:22 .env files
  • 00:16:39 Creating models in mongoose
  • 00:19:34 Registering a user
  • 00:25:40 Validation with Joi
  • 00:42:35 Hashing passwords
  • 00:48:53 Setting up the login route
  • 00:57:25 Adding jsonwebtokens to our auth
  • 01:03:25 Creating private routes with jwt

security api nodejs node-js webdev

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

How to Hire Node.js Developers And How Much Does It Cost?

A Guide to Hire Node.js Developers who can help you create fast and efficient web applications. Also, know how much does it cost to hire Node.js Developers.

Node.js API Tutorial for Beginners - Building API using NodeJS

Learn Node.js - Node.js API Development for Beginners, you'll learn the core fundamentals of NodeJS so that you can start building API using NodeJS. You will learn Modern JavaScript, NodeJS event loop, Asynchronous programming, using node modules, npm modules and creating your own modules, creating server, connect to database and sending json responses.

Learn how to use NestJS, Node.js framework to build a secure API

Learn how to use NestJS, a Node.js framework powered by TypeScript, to build a secure API

Top Node.js Development Companies and Expert NodeJS Developers

A thoroughly researched list of top NodeJS development companies with ratings & reviews to help hire the best Node.JS developers who provide development services and solutions across the world. List of Leading Node.js development Service Providers...