You are previewing Rails 3 in Action.

Rails 3 in Action

Cover of Rails 3 in Action by Ryan Bigg... Published by Manning Publications

Chapter 15. Alternative authentication

This chapter covers

  • Authenticating against external services using OmniAuth
  • Authenticating with Twitter using OAuth
  • Authenticating with GitHub using OAuth

Now that your application has been deployed to a server somewhere (or at least you’ve gone through the motions of doing that!), we’re going to look at adding additional features to your application. One of these is OAuth authentication from services such as Twitter and GitHub.

When you sign into a website, you can generally use a couple of authentication methods. The first of these would be a username and password, with the username being forced to be unique. This method provides a solid way to identify what user has logged into the website, and ...

The best content for your career. Discover unlimited learning on demand for around $1/day.