In Railscast: http://railscasts.com/episodes/241-simple-omniauth Ryan uses omniauth for logins. In the video when he clicks on the login button the first time Twitter asks the u
Adding a non-rails answer here.
Just be sure to check in the twitter settings for your app that the "Allow this application to be used to Sign in with Twitter" checkbox is selected. Otherwise Twitter will always redirect you to the authorize page instead of authenticate.
I spend 45 minutes troubleshooting the rails app before finally checking the twitter settings, hopefully this will save someone some time.