400 bad request
Closed this issue · 1 comments
toxaq commented
Hi, does this plugin still function? All I get is
Started GET "/auth/flickr" for 127.0.0.1 at 2014-03-09 15:20:17 +1300
OAuth::Unauthorized (400 Bad Request):
The flickraw functionality worked with the same credentials, but I'm using omniauth across others and would like to standardise if possible.
toxaq commented
Turns out because I was using the the dynamic setup and had copied the facebook version the keys were wrong. If you need to use dynamic setup, it would look like:
FLICKR_SETUP_PROC = lambda do |env|
env['omniauth.strategy'].options[:consumer_key] = ENV['FLICKR_KEY']
env['omniauth.strategy'].options[:client_secret] = ENV['FLICKR_SECRET']
end
Rails.application.config.middleware.use OmniAuth::Builder do
provider :flickr, :setup => FLICKR_SETUP_PROC
end
Works perfectly, thanks.