Skip to content

Instantly share code, notes, and snippets.

@chrislo
Created March 22, 2011 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrislo/881687 to your computer and use it in GitHub Desktop.
Save chrislo/881687 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'omniauth'
require 'pp'
use OmniAuth::Builder do
provider :twitter, '<key>', '<secret>'
end
enable :sessions
enable :run
get '/' do
<<-HTML
<a href='/auth/twitter'>Sign in with Twitter</a>
HTML
end
get '/auth/:name/callback' do
auth = request.env['omniauth.auth']
pp auth
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment