Removing rack.auth reference

This commit is contained in:
Michael Bleigh 2010-10-11 11:17:12 -05:00
parent d25178f15e
commit 0eafa3d229
1 changed files with 2 additions and 2 deletions

View File

@ -35,10 +35,10 @@ OmniAuth is a collection of Rack middleware. To use a single strategy, you simpl
require 'oa-oauth'
use OmniAuth::Strategies::Twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
Now to initiate authentication you merely need to redirect the user to `/auth/twitter` via a link or other means. Once the user has authenticated to Twitter, they will be redirected to `/auth/twitter/callback`. You should build an endpoint that handles this URL, at which point you will will have access to the authentication information through the `rack.auth` parameter of the Rack environment. For example, in Sinatra you would do something like this:
Now to initiate authentication you merely need to redirect the user to `/auth/twitter` via a link or other means. Once the user has authenticated to Twitter, they will be redirected to `/auth/twitter/callback`. You should build an endpoint that handles this URL, at which point you will will have access to the authentication information through the `omniauth.auth` parameter of the Rack environment. For example, in Sinatra you would do something like this:
get '/auth/twitter/callback' do
auth_hash = request.env['rack.auth']
auth_hash = request.env['omniauth.auth']
end
The hash in question will look something like this: