github_database.rb 361 B

123456789101112131415
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class GithubDatabase < OmniAuth::Strategies::GitHub
  3. option :name, 'github'
  4. def initialize(app, *args, &block)
  5. # database lookup
  6. config = Setting.get('auth_github_credentials') || {}
  7. args[0] = config['app_id']
  8. args[1] = config['app_secret']
  9. super
  10. end
  11. end