-
Notifications
You must be signed in to change notification settings - Fork 215
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
OAuth RequestToken no longer works in Rails 3.1 OAuth::Unauthorized: 401 Unauthorized #106
Comments
Bump. Anyone have any idea what could be going on? |
get_request_method wants to get a hash (see: http://oauth.rubyforge.org/rdoc/classes/OAuth/Consumer.html#M000109), but string is provided (https://github.com/pelle/oauth-plugin/blob/master/lib/oauth/controllers/consumer_controller.rb#25 ):
|
I have similar issue. I'm using Rails 3.0.11 |
I think I have the same issue now with Rails 3.2. When requesting a request_token, I get 401 Unauthorized response. But here is how it looks on server side: Started POST "/oauth/request_token" for 127.0.0.1 at 2012-04-25 14:11:56 +0300 Basically it stumbles at this: provider_controller.rb: Any suggestion how this can be fixed and what is going on? |
I'm not sure if I can advertise another gem here, so excuse me. But I've solved this problem by switching to doorkeeper gem |
Hmm, I may have to keep doorkeeper a shot then. |
Pretty cool, thanks for the hint! |
I had to do a few things to get this working. First the middleware was using find_by_key on ClientApplication which mongoid doesn't support, so I added this:
Then the 401 unauthorized for So I added:
to |
I had to do a couple of things to fix the 401 unauthorized issue:
before_filter oauthenticate :interactive => false, :strategies => [:token]
before_filter :oauth_strategies def oauth_strategies This is just a quick fix to make the basic flow work, there is probably a better solution for this. |
I successfully implemented a Rails 3.0.9 app as an OAuth provider using the oauth and oauth-plugin gems. However, to Rails 3.1.3, I'm receiving an 401 Unauthorized error when attempting to get the request token. I'm not sure whether it's an incompatibility with the gem or an issue with Rails 3.1.3.
I've been testing locally with the following:
In the console:
I've tried downgrading the oauth and oauth-plugin gems, but that doesn't seem to help. The same setup seems to work as expected in Rails 3.0.9. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: