Skip to content

bezkoder/jwt-refresh-token-node-js-mongodb

Repository files navigation

Node.js JWT Refresh Token with MongoDB example

JWT Refresh Token Implementation with Node.js Express and MongoDB. You can know how to expire the JWT, then renew the Access Token with Refresh Token.

For instruction, please visit:

Node.js JWT Refresh Token with MongoDB example

The code in this post bases on previous article that you need to read first:

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

User Registration, User Login and Authorization process.

The diagram shows flow of how we implement User Registration, User Login and Authorization process.

jwt-token-authentication-node-js-example-flow

And this is for Refresh Token:

jwt-refresh-token-node-js-example-flow

More Practice:

Node.js, Express & MongoDb: Build a CRUD Rest Api example

Server side Pagination in Node.js with MongoDB and Mongoose

Associations:

MongoDB One-to-One relationship tutorial with Mongoose examples

MongoDB One-to-Many Relationship tutorial with Mongoose examples

MongoDB Many-to-Many Relationship with Mongoose examples

Fullstack:

Vue.js + Node.js + Express + MySQL example

Vue.js + Node.js + Express + PostgreSQL example

Vue.js + Node.js + Express + MongoDB example

Angular 8 + Node.js + Express + MySQL example

Angular 8 + Node.js + Express + PostgreSQL example

Angular 8 + Node.js + Express + MongoDB example

Angular 10 + Node.js + Express + MySQL example

Angular 10 + Node.js + Express + PostgreSQL example

Angular 10 + Node.js + Express + MongoDB example

Angular 11 + Node.js Express + MySQL example

Angular 11 + Node.js + Express + PostgreSQL example

Angular 11 + Node.js + Express + MongoDB example

React + Node.js + Express + MySQL example

React + Node.js + Express + PostgreSQL example

React + Node.js + Express + MongoDB example

Integration (run back-end & front-end on same server/port)

Integrate React with Node.js Restful Services

Integrate Angular with Node.js Restful Services

Integrate Vue with Node.js Restful Services

Project setup

npm install

Run

node server.js