arunagw / omniauth-twitter

OmniAuth strategy for Twitter
http://arunagw.github.io/omniauth-twitter/
578 stars 167 forks source link

/auth/twitter request params aren't set from omniauth options keys #134

Closed ericpromislow closed 4 years ago

ericpromislow commented 4 years ago

I was getting 403s trying to hit /auth/twitter like in the docs, and debugged omniauth-1.9.0/lib/omniauth/strategy.rb to see that the values I have in options.consumer_key and options.consumer_secret aren't getting copied to request.params, which would explain the 403s. All I've done is added omniauth-twitter to Gemfile and rebundled, and added to config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :twitter, Rails.application.credentials.twitter_api_key,
                              Rails.application.credentials.twitter_api_secret
end

This is with ruby 2.5.5 and rails 6.0.2.1 -- Bug, or did I leave out a step?

ericpromislow commented 4 years ago

I turned the light off and back on and it seems to work: