Session Stores and Restricting Page Access | Node Auth Tut - Part 6

June 22nd 2017 | 8.4k views

Session storage is a must when going about development for a user based app. Since sessions determine whether or not a user should stay logged in after registering or logging in for the first time, it's important that we monitor these sessions in a place where they won't get deleted if our Node process restarts or terminates. As a result, we make use of something called a session store which will move your session's from being stored on your node process to being stored within your app's database.

Learn how to integrate session stores and restrict access to particular pages when a user is logged in or logged out.

Restrict Page Access Middleware:

https://gist.github.com/christopher4lis/f7121a07740e5dbca860c9beb2910565