Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply omniauth #133

Merged
merged 5 commits into from
Feb 13, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move all logic to omniauth
implement omniauth-facebook / omniauth-twitter
  • Loading branch information
xdite committed Feb 13, 2013
commit 9189d937f79b6e54c44d4b2f5f21adf726a7b657
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ gem 'hiredis'
gem 'hpricot'
gem 'i18n-js'
gem 'jquery-rails'
gem 'koala', require: false
gem 'multi_json'
gem 'mustache'
gem 'nokogiri'
gem "omniauth"
gem "omniauth-openid"
gem 'oauth', require: false
gem "omniauth-facebook"
gem "omniauth-twitter"
gem 'oj'
gem 'pbkdf2'
gem 'pg'
Expand Down
29 changes: 22 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ GEM
multi_json (~> 1.0)
acts_as_paranoid (0.4.1)
activerecord (~> 3.2)
addressable (2.3.2)
airbrake (3.1.2)
activesupport
builder
Expand Down Expand Up @@ -178,6 +177,7 @@ GEM
hike (1.2.1)
hiredis (0.4.5)
hpricot (0.8.6)
httpauth (0.2.0)
i18n (0.6.1)
i18n-js (2.1.2)
i18n
Expand All @@ -196,10 +196,8 @@ GEM
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7)
koala (1.6.0)
addressable (~> 2.2)
faraday (~> 0.8)
multi_json (~> 1.3)
jwt (0.1.5)
multi_json (>= 1.0)
libv8 (3.11.8.13)
listen (0.7.2)
lumberjack (1.0.2)
Expand All @@ -220,13 +218,30 @@ GEM
net-ssh (2.6.3)
nokogiri (1.5.6)
oauth (0.4.7)
oauth2 (0.8.0)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
oj (2.0.3)
omniauth (1.1.1)
hashie (~> 1.2)
rack
omniauth-facebook (1.4.1)
omniauth-oauth2 (~> 1.1.0)
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
omniauth-twitter (0.0.14)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
pbkdf2 (0.1.0)
pg (0.14.1)
polyglot (0.3.3)
Expand Down Expand Up @@ -408,16 +423,16 @@ DEPENDENCIES
image_optim
jasminerice
jquery-rails
koala
message_bus!
mocha
multi_json
mustache
nokogiri
oauth
oj
omniauth
omniauth-facebook
omniauth-openid
omniauth-twitter
pbkdf2
pg
pry-rails
Expand Down
5 changes: 4 additions & 1 deletion SOFTWARE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ The following Ruby Gems are used in Discourse:
* [i18n-js](https://rubygems.org/gems/i18n-js)
* [pbkdf2](https://rubygems.org/gems/pbkdf2)
* [fast_xs](https://rubygems.org/gems/fast_xs)
* [koala](https://rubygems.org/gems/koala)
* [omniauth](https://github.com/intridea/omniauth)
* [omniauth-openid](https://github.com/intridea/omniauth-openid)
* [omniauth-facebook](https://github.com/mkdynamic/omniauth-facebook)
* [omniauth-twitter](https://github.com/arunagw/omniauth-twitter)
* [has_ip_address](https://rubygems.org/gems/has_ip_address)
* [vestal_versions](https://rubygems.org/gems/vestal_versions)
* [coffee-rails](https://rubygems.org/gems/coffee-rails)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ window.Discourse.LoginView = window.Discourse.ModalBodyView.extend Discourse.Pre
@set('authenticate', 'twitter')
left = @get('lastX') - 400
top = @get('lastY') - 200
window.open("/twitter/frame", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top)
window.open("/auth/twitter", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top)

facebookLogin: ()->
@set('authenticate', 'facebook')
left = @get('lastX') - 400
top = @get('lastY') - 200
window.open("/facebook/frame", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top)
window.open("/auth/facebook", "_blank", "menubar=no,status=no,height=400,width=800,left=" + left + ",top=" + top)

openidLogin: (provider)->
left = @get('lastX') - 400
Expand Down
93 changes: 0 additions & 93 deletions app/controllers/facebook_controller.rb

This file was deleted.

85 changes: 0 additions & 85 deletions app/controllers/twitter_controller.rb

This file was deleted.

72 changes: 0 additions & 72 deletions app/controllers/user_open_ids_controller.rb

This file was deleted.

Loading