google_oauth2_database.rb 410 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class OmniAuth::Strategies::GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
  3. option :name, 'google_oauth2'
  4. def initialize(app, *args, &)
  5. # database lookup
  6. config = Setting.get('auth_google_oauth2_credentials') || {}
  7. args[0] = config['client_id']
  8. args[1] = config['client_secret']
  9. super
  10. end
  11. end