2012-02-25 22:43:17 +00:00
|
|
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
2012-06-09 14:11:29 +00:00
|
|
|
provider :twitter, CFG['TWITTER_CONSUMER_KEY'], CFG['TWITTER_CONSUMER_SECRET'], :client_options => { :ssl => { :ca_path => "/etc/ssl/certs" } }
|
|
|
|
provider :github, CFG['GITHUB_CONSUMER_KEY'], CFG['GITHUB_CONSUMER_SECRET'], :client_options => { :ssl => { :ca_path => "/etc/ssl/certs" } }
|
2012-02-25 22:43:17 +00:00
|
|
|
end
|
2013-07-05 19:40:40 +00:00
|
|
|
|
|
|
|
OmniAuth.config.on_failure = Proc.new { |env|
|
|
|
|
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
|
|
|
|
}
|
2013-08-19 15:08:13 +00:00
|
|
|
|
|
|
|
Rails.application.config.middleware.insert_after OmniAuth::Builder, OmniAuthUserLoader
|