Created
April 1, 2015 15:38
-
-
Save rodrigoargumedo/531c1aae1887c3499024 to your computer and use it in GitHub Desktop.
This explains how to resolve the 401 Unauthorized status code and redirect your twitter app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lastly, Changing in OmniAuth.rb will affect this file too. | |
# Change this line in order to fully work and restart the server when you save this file. | |
# ...viola! You now have profit to make. | |
Devise.setup do |config| | |
config.omniauth :twitter, Rails.application.secrets.twitter_consumer_key, Rails.application.secrets.twitter_consumer_secret | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Next, you will need to change this line of code to work this out. | |
# This will rertrieve the keys from config/secrets.yml | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :twitter, Rails.application.secrets.twitter_consumer_key, Rails.application.secrets.twitter_consumer_secret | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In order to OmniAuth-Twitter gem to work, you will need to place your keys on | |
# to this file. | |
twitter_consumer_key: [your consumer key here] | |
twitter_consumer_secret: [your consumer secret here] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment