From 4ccb7354d196d239cc1c0c9db7d79b637a8606b7 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 14 Feb 2013 09:12:20 +1100 Subject: [PATCH] nuking SSL = bad --- config/initializers/omniauth.rb | 36 +++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index 8ff8a09ece0..2ab0e6f77eb 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -1,17 +1,31 @@ require 'openid/store/filesystem' require 'openssl' require 'openid_redis_store' -module OpenSSL - module SSL - remove_const :VERIFY_PEER - end -end -OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE +# if you need to test this and are having ssl issues see: +# http://stackoverflow.com/questions/6756460/openssl-error-using-omniauth-specified-ssl-path-but-didnt-work Rails.application.config.middleware.use OmniAuth::Builder do - provider :open_id, :store => OpenID::Store::Redis.new($redis), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id', :require => 'omniauth-openid' - provider :open_id, :store => OpenID::Store::Redis.new($redis), :name => 'yahoo', :identifier => 'https://me.yahoo.com', :require => 'omniauth-openid' - provider :facebook, SiteSetting.facebook_app_id, SiteSetting.facebook_app_secret, :scope => "email" - provider :twitter, SiteSetting.twitter_consumer_key , SiteSetting.twitter_consumer_secret -end \ No newline at end of file + + provider :open_id, + :store => OpenID::Store::Redis.new($redis), + :name => 'google', + :identifier => 'https://www.google.com/accounts/o8/id', + :require => 'omniauth-openid' + + provider :open_id, + :store => OpenID::Store::Redis.new($redis), + :name => 'yahoo', + :identifier => 'https://me.yahoo.com', + :require => 'omniauth-openid' + + provider :facebook, + SiteSetting.facebook_app_id, + SiteSetting.facebook_app_secret, + :scope => "email" + + provider :twitter, + SiteSetting.twitter_consumer_key, + SiteSetting.twitter_consumer_secret + +end