1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- Rails.root.glob('lib/omniauth/*').each do |file|
- if File.file?(file)
- require file
- end
- end
- Rails.application.config.middleware.use OmniAuth::Builder do
-
- provider :twitter_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database', {
- client_options: {
- authorize_path: '/oauth/authorize',
- site: 'https://api.twitter.com',
- }
- }
-
- provider :facebook_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database'
-
- provider :linked_in_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database'
-
- provider :google_oauth2_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database', access_type: 'online', prompt: ''
-
- provider :github_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database'
-
- provider :git_lab_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database', {
- client_options: {
- site: 'https://not_change_will_be_set_by_database',
- authorize_url: '/oauth/authorize',
- token_url: '/oauth/token'
- },
- scope: 'read_user',
- }
-
- provider :microsoft_office365_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database'
-
- provider :weibo_database, 'not_change_will_be_set_by_database', 'not_change_will_be_set_by_database'
-
- provider :saml_database
- end
- OmniAuth.config.full_host = proc {
- "#{Setting.get('http_type')}://#{Setting.get('fqdn')}"
- }
- OmniAuth.config.logger = Rails.logger
|