ruby on rails - Multiple Twitter applications with omniauth -


i've configured devise + omniauth documented on omniauth wiki: https://github.com/intridea/omniauth/wiki/setup-phase

my initializer:

provider :twitter, nil, nil, setup: true 

routes.rb:

get '/settings/auth/:provider/setup' => 'settings/authorization_callbacks#setup' 

this setup action

def setup   application_id = params[:application_id].present? ? params[:application_id] : request.env["rack.session"]["omniauth.params"]["application_id"]   application = application.find(application_id)   request.env['omniauth.strategy'].options[:client_id] = application.identifier   request.env['omniauth.strategy'].options[:client_secret] = application.secret   render :text => "setup complete.", :status => 404 end 

result 400 bad request , have no idea why... checked , right application called, setting right values in "omniauth.strategy".

maybe implemented can guess what's problem code? in advance.

this bug in omniauth-twitter gem.

the keys set twitter are

request.env['omniauth.strategy'].options[:consumer_key] = application.identifier request.env['omniauth.strategy'].options[:consumer_secret] = application.secret 

https://github.com/arunagw/omniauth-twitter/issues/100


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -