© Christopher Pitt 2018
Christopher PittThe Definitive Guide to AdonisJshttps://doi.org/10.1007/978-1-4842-3390-0_11

11. Sessions

Christopher Pitt1 
(1)
Cape Town, Western Cape, South Africa
 

In the previous chapter, we learned how to validate form data and present custom error pages to customers. We’re well on our way to having a professional, polished commerce web site. But there’s one area we’re still a bit behind in: we need to make a way for customers to log in and update their profiles. We created the registration and login forms in previous chapters. We also saw how to persist those details to the database and validate login credentials.

In this chapter, we’re going to learn how to create customer sessions. We’ll use these to ensure that customers ...

Get The Definitive Guide to AdonisJs: Building Node.js Applications with JavaScript 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.