Skip to content

Commit

Permalink
Fixes OAuth 2 Strategy.
Browse files Browse the repository at this point in the history
OAuth2 providers require the original redrect_uri to be included in the request
when getting an access token. This was previously including extra parameters on that uri
and getting 40x errors from various providers.
  • Loading branch information
philnash committed Jan 12, 2011
1 parent 31e9639 commit 91200ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oa-oauth/lib/omniauth/strategies/oauth2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def client
::OAuth2::Client.new(client_id, client_secret, client_options.merge(options[:client_options] || {}))
end

def callback_url
full_host + callback_path
end

protected

def request_phase
Expand Down

2 comments on commit 91200ff

@sbfaulkner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey... now that oauth and oauth2 (and ldap) are working again, can I request that you tag it 0.2.0.beta2 or something so that our bundles can reference a "working" version by tag?

@tf
Copy link

@tf tf commented on 91200ff Jan 16, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Please sign in to comment.