google_oauth2_database.rb 316 B

12345678910111213
  1. class GoogleOauth2Database < OmniAuth::Strategies::GoogleOauth2
  2. option :name, 'google_oauth2'
  3. def initialize(app, *args, &block)
  4. # database lookup
  5. config = Setting.get('auth_google_oauth2_credentials') || {}
  6. args[0] = config['client_id']
  7. args[1] = config['client_secret']
  8. super
  9. end
  10. end