Ravenna/testfan — pull request #1 by beaucollins (2011-12-29 19:44:03+00:00)
Title: Logging in with Facebook

This will log in a user with Facebook. UI still needs some work. After the app is approved by the user they will not have to log in again when visiting the app.

We can potentially store some personal information like their name if we want to personalize their User record beyond just the Facebook id.

There are some modifications that have been made to the Devise settings for security purposes:

1) The Facebook secret has been removed from the repo and a new one has been generated. It has been set as a heroku config variable. You can see it's value using:

heroku config

When running the app locally you'll want to something like:

bundle exec FACEBOOK_APP_SECRET=abdkjfeiejeife892233434 rails server

Or you can set the environment variable in your `~/.bash_profile` file:

set FACEBOOK_APP_SECRET=baasfkljsdalfjasfkljoiewf

And then start the server normally:

bundle exec rails server

2) For authentication we're now using `devise-facebook` which makes logging with the FB javascript SDK a snap.