Rack::OAuth

To view this screencast, add it to your cart and checkout. You can buy this screencast for any price, including FREE!

Rack::OAuth is a Rack middleware for easily integrating OAuth into your Ruby web applications.

If you’re using a Sinatra application or Rackup file, all you need to do is:

1 use Rack::OAuth, :key    => 'your-oauth-app-key',
2                  :secret => 'your-oauth-app-secret',
3                  :site   => 'http://twitter-or-whatever.com'

If you’re using Rails, all you need to do is:

1 config.middleware.use Rack::OAuth, :key => '...', :secret => '...', :site => '...'

Then, whenever you want to have your user redirected to authorize OAuth access, redirect them to /oauth_login.

After the OAuth authorization is complete, they’ll be redirected back to /oauth_complete.

Ofcourse all of these paths are configurable and there are more configration options available. To find out more, check out the screencast or checkout the code at:

http://github.com/remi/rack-oauth