2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2012-11-18 11:04:03 +00:00
|
|
|
class GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
|
|
|
|
option :name, 'google_oauth2'
|
2012-04-18 11:26:59 +00:00
|
|
|
|
2012-11-18 11:04:03 +00:00
|
|
|
def initialize(app, *args, &block)
|
2012-04-18 11:26:59 +00:00
|
|
|
|
2012-11-18 11:04:03 +00:00
|
|
|
# database lookup
|
2015-05-07 20:49:15 +00:00
|
|
|
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
|
2012-04-18 11:26:59 +00:00
|
|
|
end
|
2012-11-18 11:04:03 +00:00
|
|
|
|
2012-04-18 11:26:59 +00:00
|
|
|
end
|