Search code examples
ruby-on-railsrubyoauthcloud9-ide

Oauth Unauthorized Ruby


I'm having trouble configuring my Twitter Oauth in a RubyonRails webapp.

The full trace error: http://pastebin.com/2yf1cE8E

The User.rb http://pastebin.com/UUTiTKvy

The app controller http://pastebin.com/bK9ghUJR

The session controller http://pastebin.com/kxYRd1TU

The routes.rb http://pastebin.com/bt7HMRFy

Omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, 'JsR9zFGrVuDYuFueRnBQK9tpp', '   tDubF5v9uDRvfio7UBZd2XlFYUQQrftE7Qzk6FPaNOucOTWVlf'
end

Thanks, Alex.


Solution

  • Looking at the error, I think you did not define the callback url of Twitter. You have to go into twitter applications and define the URL of your webapp in your callback.