2013-02-12 01:51:44 -05:00
|
|
|
require 'openssl'
|
2013-02-13 03:48:44 -05:00
|
|
|
require 'openid_redis_store'
|
2013-02-12 01:51:44 -05:00
|
|
|
|
2013-02-14 14:11:13 -05:00
|
|
|
# if you need to test this and are having ssl issues see:
|
2013-02-13 17:12:20 -05:00
|
|
|
# http://stackoverflow.com/questions/6756460/openssl-error-using-omniauth-specified-ssl-path-but-didnt-work
|
2013-02-12 01:51:44 -05:00
|
|
|
|
|
|
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
2013-02-13 17:12:20 -05:00
|
|
|
|
2013-02-14 14:11:13 -05:00
|
|
|
provider :open_id,
|
|
|
|
:store => OpenID::Store::Redis.new($redis),
|
|
|
|
:name => 'google',
|
|
|
|
:identifier => 'https://www.google.com/accounts/o8/id',
|
|
|
|
:require => 'omniauth-openid'
|
2013-02-13 17:12:20 -05:00
|
|
|
|
2013-02-14 14:11:13 -05:00
|
|
|
provider :open_id,
|
|
|
|
:store => OpenID::Store::Redis.new($redis),
|
|
|
|
:name => 'yahoo',
|
|
|
|
:identifier => 'https://me.yahoo.com',
|
|
|
|
:require => 'omniauth-openid'
|
2013-02-13 17:12:20 -05:00
|
|
|
|
2013-02-14 14:11:13 -05:00
|
|
|
provider :facebook,
|
|
|
|
SiteSetting.facebook_app_id,
|
|
|
|
SiteSetting.facebook_app_secret,
|
2013-02-13 17:12:20 -05:00
|
|
|
:scope => "email"
|
|
|
|
|
2013-02-14 14:11:13 -05:00
|
|
|
provider :twitter,
|
|
|
|
SiteSetting.twitter_consumer_key,
|
2013-02-13 17:12:20 -05:00
|
|
|
SiteSetting.twitter_consumer_secret
|
|
|
|
|
2013-02-25 23:28:32 -05:00
|
|
|
provider :github,
|
|
|
|
SiteSetting.github_client_id,
|
|
|
|
SiteSetting.github_client_secret
|
|
|
|
|
2013-02-25 19:10:16 -05:00
|
|
|
provider :browser_id,
|
|
|
|
:name => 'persona'
|
|
|
|
|
2013-02-13 17:12:20 -05:00
|
|
|
end
|