example rails 3 application that uses oauth
Ruby
Failed to load latest commit information.
app Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
config Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
db Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
doc
lib Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
public Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
script Create fresh Rails 3 app Dec 2, 2010
spec Remove EOL whitespace May 7, 2011
test Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
vendor/plugins Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
.gitignore Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
.rspec Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
Gemfile Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
Gemfile.lock Update simple_oauth dependency to version 0.1.5 May 6, 2011
README.md Link to Sign in with Twitter May 7, 2011
Rakefile Revert "Create fresh Rails 3.1.0.beta1 app" May 6, 2011
config.ru

README.md

TwitterApp

TwitterApp is a very basic Rails 3 application that demonstrates how to use the Sign in with Twitter workflow with version 1.x of the twitter gem (which has removed built-in OAuth support).

Installation

git clone git://github.com/jnunemaker/twitter-app.git
cd twitter-app
bundle install

Usage

Using TwitterApp requires you to register an app with Twitter to obtain OAuth credentials. Once you obtain credentials, substitute your consumer key and secret into the command below.

CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server

OmniAuth

If you would like to see how to use the omniauth gem for authentication, Erik Michaels-Ober maintains a simple Rails application that demonstrates how to do so.