Wrapping Up

In this chapter we looked at the session, an integral part of the authentication scheme. We started by setting up a session system and then added layers of security. We looked at how to add a Time-to-Live, secure cookies, mitigate session-fixation attacks, and add protections against hijacking.

We’ve covered our bases for authenticating a user and setting up a secure session, so in the next chapter we’ll look at how to allow or deny user access to resources based on the user’s access level.

Get Secure Your Node.js Web Application now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.