Node.js + MongoDB: User Authentication & Authorization with JWT

In this tutorial, we’re gonna build a Node.js & MongoDB example that supports User Authentication (Registation, Login) & Authorization with JSONWebToken (JWT). You’ll know:

  • Appropriate Flow for User Signup & User Login with JWT Authentication
  • Node.js Express Architecture with CORS, Authenticaton & Authorization middlewares, Mongoose ODM
  • Way to configure Express routes to work with JWT
  • How to define Mongoose Models for Authentication and Authorization
  • How to use Mongoose to interact with MongoDB Database

Related Posts:
MERN stack Authentication example
MEAN stack Authentication with Angular 8 example
MEAN stack Authentication with Angular 10 example
MEAN stack Authentication with Angular 11 example
Node.js, Express & MongoDb: Build a CRUD Rest Api example
MongoDB One-to-Many Relationship tutorial with Mongoose examples
MongoDB Many-to-Many Relationship with Mongoose examples

Read More

react-jwt-authentication-feature-image

React JWT Authentication (without Redux) example

In this tutorial, we’re gonna build a React.js JWT Authentication: Login and Registration example with LocalStorage, React Router, Axios and Bootstrap (without Redux). I will show you:

  • JWT Authentication Flow for User Signup & User Login
  • Project Structure for React JWT Authentication (without Redux) with LocalStorage, React Router & Axios
  • Creating React Components with Form Validation
  • React Components for accessing protected Resources (Authorization)
  • Dynamic Navigation Bar in React App

Related Posts:
In-depth Introduction to JWT-JSON Web Token
React.js CRUD example to consume Web API
React File Upload with Axios and Progress Bar to Rest API

Fullstack (JWT Authentication & Authorization example):
React + Spring Boot
React + Node.js Express + MySQL/PostgreSQL
React + Node.js Express + MongoDB

The example using React Hooks:
React Hooks: JWT Authentication (without Redux) example

Or using Redux for state management:
React Redux: JWT Authentication & Authorization example

Read More

Node.js Express + Angular 8: JWT Authentication & Authorization example

In this tutorial, we will learn how to build a full stack Node.js Express + Angular 8 Authentication example. The back-end server uses Node.js Express with jsonwebtoken for JWT authentication and Sequelize for interacting with MySQL database & Authorization. The front-end will be created with Angular 8 with HttpInterceptor and Router. We’ll also perform Form validation on UI.

Related Posts:
Node.js + MongoDB: User Authentication & Authorization with JWT
Node.js + PostgreSQL: User Authentication & Authorization with JWT

Run both projects in one place:
How to Integrate Angular 8 with Node.js Restful Services

Fullstack with MongoDB:
MEAN stack Authentication: Login & Registration with Angular 8 example

Read More

spring-boot-authentication-jwt-spring-security-feature-image

Spring Boot Token based Authentication with Spring Security & JWT

In this tutorial, we’re gonna build a Spring Boot Application that supports Token based Authentication with JWT. You’ll know:

  • Appropriate Flow for User Signup & User Login with JWT Authentication
  • Spring Boot Application Architecture with Spring Security
  • How to configure Spring Security to work with JWT
  • How to define Data Models and association for Authentication and Authorization
  • Way to use Spring Data JPA to interact with PostgreSQL/MySQL Database

Lots of interesting things ahead, let’s explore together.


– Related Post: Spring Boot, Spring Data JPA – Building Rest CRUD API example
– More Practice:

– Fullstack:

Deployment: Deploy Spring Boot App on AWS – Elastic Beanstalk
Read More

spring-boot-react-authentication-jwt-example-feature-image

Spring Boot + React: JWT Authentication with Spring Security

In this tutorial, we will learn how to build a full stack Spring Boot + React.js Authentication example. The back-end server uses Spring Boot with Spring Security for JWT authentication and Spring Data for interacting with database. The front-end will be created with React, React Router & Axios. We’ll also use Bootstrap and perform Form validation.

Related Post:
Spring Boot + React + MySQL: CRUD example
Spring Boot + React + PostgreSQL: CRUD example
React Upload/Download Files to/from Spring Boot Server

Run both projects in one place:
How to integrate React.js with Spring Boot

Read More

spring-boot-vue-authentication-jwt-spring-security-feature-image

Spring Boot + Vue.js: Authentication with JWT & Spring Security Example

In this tutorial, we will learn how to build a full stack Spring Boot + Vue.js Authentication example. The back-end server uses Spring Boot with Spring Security for JWT authentication and Spring Data JPA for interacting with database. The front-end will be created with Vue and Vuex. We’ll also use vee-validate to perform Form validation and vue-fontawesome for make our UI more comfortable to view.

It will be pretty long, but interesting. Let’s get started.


Related Post: Spring Boot + Vue.js example: Build a CRUD App
More Practice:
CRUD GraphQL APIs example with Spring Boot, MySQL & Spring JPA
Vue + Spring Boot: File Upload example

Run both Project on same server/port:
How to integrate Vue.js with Spring Boot

Read More