asciinema.org/config/initializers/omniauth.rb
2013-10-20 18:07:03 +02:00

10 lines
483 B
Ruby

Rails.application.config.middleware.use OmniAuth::Builder do
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" } }
provider :browser_id
end
OmniAuth.config.on_failure = Proc.new { |env|
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
}