RailsSpace: Building a Social Networking Website with Ruby on Rails™
by Michael Hartl, Aurelius Prochazka
Chapter 6. Logging in and out
In Chapter 4, we implemented a rudimentary default user page, and we promised to restrict access to this page based on the user’s login status. This is the first of two chapters fulfilling that promise. In this chapter, we develop a basic login and authentication system, and in Chapter 7 we implement a more advanced system with cookie-based “remember me” functionality.
While it’s certainly possible to implement a simple login system using relatively little code, taking the time to build an industrial-strength authentication system is well worth the effort. After all, virtually every web application requires some sort of login machinery for its operation. Moreover, authentication offers a rich variety of problems ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access