trabajo-afectivo/lib/omniauth/google_oauth2_database.rb

14 lines
316 B
Ruby
Raw Normal View History

2012-11-18 11:04:03 +00:00
class GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
option :name, 'google_oauth2'
2012-11-18 11:04:03 +00:00
def initialize(app, *args, &block)
2012-11-18 11:04:03 +00:00
# database lookup
config = Setting.get('auth_google_oauth2_credentials') || {}
2012-11-18 11:04:03 +00:00
args[0] = config['client_id']
args[1] = config['client_secret']
super
end
2012-11-18 11:04:03 +00:00
end