

You have already learned how to structure Node.js projects in the previous chapter of Node Hero, so let’s use that knowledge! The Demo Application which needs Authenticationįor demonstration purposes, let’s build an application that does only the following: This way our application will be a lot easier to scale. We are going to store our user’s session information in Redis, and not in the process’s memory. Redis is designed to support different kinds of abstract data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlogs and geospatial indexes with radius queries.Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker.Passport is an authentication middleware for Node.js which we are going to use for session management. Passport.js can be dropped into any Express.js-based web application.Passport.js is a simple, unobtrusive Node.js authentication middleware for Node.js.


See all chapters of the Node Hero tutorial series: This is the 8th part of our Node.js tutorial series called Node Hero – in these chapters, you will learn how to get started with Node.js and deliver software products using it. Despite their complexity, authentication mechanisms can be easily implemented into Node.js. You are going to learn how to create an authentication interface with Node.js & Passport.js, where users will provide their usernames and passwords. authentication strategy using Redis with Express. Node.js is free of locks, so there's no chance to dead-lock any process. This Passport.js tutorial will walk you through the steps of setting up a local Node.js Node.js is an asynchronous event-driven JavaScript runtime and is the most effective when building scalable network applications.
