Fumbling My Way Through Devise and OmniAuth

I spent the better part of my morning working through a Rails Cast on getting Devise and OmniAuth to work to together, with the end goal of being able to log into a web app using your Twitter account. 

Overall, it was pretty straightforward, but there were definitely a few things taken for granted by Mr. Bates, that I had to find out through extensive googling: 

1) OAuth::Unauthorized (401 Unauthorized) issues

A) To resolve these, you should set the Calback URL within your Twitter app to http://127.0.0.1:3000/auth/twitter/callback. I found people suggesting other variation on this, but this particular formulation worked for me. 

B)  Your entry for your consumer key and consumer secret in   config/initializers/devise.rb  should look like this: 

config.omniauth :twitter, ‘GjvORl6eEN5YGYMLqNTTPQ’, ‘v5K5m70tKqsPbS0VR2pUpbJ23kzd53wHicI0sjyErc’

2) Wrong Number of Arguments in Registrations Controller error

Check out this entry on stack overflow 

3) And if you are getting stuck at  https://api.twitter.com/oauth/authenticate, it probably means you had initially authorized access to your app then change its type: https://dev.twitter.com/issues/824