Skip to content

Commit

Permalink
Fixed to prevent redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
robzolkos committed Nov 21, 2011
1 parent ccc3461 commit e3a7867
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/controllers/auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ def failure

def user
hash = {
:provider => 'my_strategy',
:uid => current_user.id.to_s,
:user_info => {
:name => current_user.email, # change if required
:provider => 'josh_id',
:id => current_user.id.to_s,
:info => {
:name => current_user.name, # change if required
:email => current_user.email, # change if required
},
:extra => {
:admin => current_user.admin?,
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
match '/auth/josh_id/authorize' => 'auth#authorize'
match '/auth/josh_id/access_token' => 'auth#access_token'
match '/auth/josh_id/user' => 'auth#user'
match '/oauth/token' => 'auth#access_token'

# Account linking
match 'authentications/:user_id/link' => 'authentications#link', :as => :link_accounts
Expand Down

0 comments on commit e3a7867

Please sign in to comment.