O'Reilly logo

Rails Crash Course by Anthony Lewis

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

Identity is a core concept in any social network, and authentication is the act of identifying yourself to a system. You want users to be able to sign up for new accounts and log into your application. Although gems like devise and authlogic provide complete authentication systems for Rails applications, in this chapter, you’ll get your hands dirty by building your own system instead.

In addition to the signup, login, and logout actions, you’ll also add methods for getting the current logged-in user’s identity and redirecting anonymous users to the login page. This authentication system will require controllers and views, so before starting, let’s take a moment to add a little style to your site with the Bootstrap framework. ...

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