O'Reilly logo

RailsSpace: Building a Social Networking Website with Ruby on Rails™ by Aurelius Prochazka, Michael Hartl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required