Creating a Logout Button and Dynamic Header | Node Auth Tut - Part 8

Published: 08 July 2017
on channel: Chris Courses
25,507
276

🚀View the updated 2020 Logout Button tutorial at: https://chriscourses.com/courses/buil...

We're at the point where we can log a user into our app, great! But how do we log them out once logged in, and how do we make sure the logout button only shows when they're logged in? The task entails making use of some Passport.js and express-session provided functions, and creating a local data object that can be used within our header's templating system (handlebars file). Follow along, and see exactly how it's done.


Video Timeline:
---------------
00:00 - Quick bug fix from the last episode
01:01 - Creating a logout button
03:22 - Creating a dynamically rendered header


The Platform:
-------------
http://chriscourses.com is a platform in progress whose goal is to educate aspiring and seasoned web developers via story driven learning.

Each course tells a different story, and each milestone reveals a different scene. With an expansive universe to explore, you c
an track your progress, and gain the necessary skills needed to build your dreams.

For updates on the progress of chriscourses.com and future videos, join the Chris Courses mailing list at http://chriscourses.com.


Support Chris Courses Through Patreon:
--------------------------------------
  / chriscourses  


Chris Courses Social:
---------------------
Twitter:   / chriscourses  
Facebook:   / chriscourses  
Instagram:   / chriscourses  


Christopher Lis Social:
-----------------------
Twitter:   / christopher4lis  
CodePen: http://codepen.io/christopher4lis
Instagram:   / christopher4lis  
SoundCloud:   / chr1sm