27.02.2013 Views

Rails%203%20In%20Action

Rails%203%20In%20Action

Rails%203%20In%20Action

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This chapter covers<br />

� Authenticating against external services<br />

using OmniAuth<br />

� Authenticating with Twitter using OAuth<br />

� Authenticating with GitHub using OAuth<br />

412<br />

Alternative<br />

authentication<br />

Now that your application has been deployed to a server somewhere (or at least<br />

you’ve gone through the motions of doing that!), we’re going to look at adding<br />

additional features to your application. One of these is OAuth authentication from<br />

services such as Twitter and GitHub.<br />

When you sign into a website, you can generally use a couple of authentication<br />

methods. The first of these would be a username and password, with the username<br />

being forced to be unique. This method provides a solid way to identify what user<br />

has logged into the website, and from that identification the website can choose to<br />

grant or deny access to specific parts of the site. You have done this with your Ticketee<br />

application, except in place of a username, you’re using an email address. An<br />

email address is an already unique value for users of a website that also allows you

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!