

Once your user has logged in to your website, you want to make sure that he doesn’t have to log back in again and again everytime he accesses your website in a certain time period, to accomplish this persistence of user login, there are three main methods.
#EXPRESS SESSION LOGIN EXAMPLE HOW TO#
How to maintain a persistent Login across refreshes? We have two parts of our app, one is the Nodejs based server in this post, and the other is the Reactjs based client which will be covered in future posts, both of these programs need to communicate with each other to fulfil our goal of user authentication, this is where REST comes in, REST is a specification that defines the communication between two different web programs should be done using HTTP requests like GET, POST, UPDATE, DELETE etc and with the data encoded in the JSON( JavaScript Object Notation ) format, this enables smooth communication between web programs written even in different languages, as long as data is sent and received according to the REST specification. In this part we will setup our Nodejs and MongoDB based REST API backend This is the first part in a three part series about building a full stack MERN( MongoDB, Express, React, NodeJS ) based Authentication Web App using Sessions & Cookies.

Tags : Nodejs Express MongoDB REST-API Backend

MERN Sessions-Based Login and Registration App Part One : Node.JS, Express and MongDB REST API Backend Tuesday, AugPosted in
