Browse files

Merge branch 'master' of github.com:elpassion/elranks

  • Loading branch information...
2 parents 896ca3c + 43b4861 commit 86b33ede4b6b6d0555931f91b415b2bd9788d076 @aserafin aserafin committed Jan 3, 2014
Showing with 0 additions and 7 deletions.
  1. +0 −7 config/initializers/omniauth.rb
View
7 config/initializers/omniauth.rb
@@ -5,13 +5,6 @@
auth_domain = ENV['AUTH_DOMAIN']
ssl_ca_file = ENV['SSL_CA_FILE']
- raise('You must specify Google OAuth 2.0 Client ID') if google_client_id.blank?
- raise('You must specify Google OAuth 2.0 Client Secret') if google_client_secret.blank?
- raise('You must specify SSL CA File') if Rails.env.production? && ssl_ca_file.blank?
-
- Rails.logger.warn('Auth Domain is not specified. Users are allowed to authenticate using any domain.') if auth_domain.blank?
- Rails.logger.warn('SSL CA File is not specified. Problems may occur when authenticating using Google OAuth 2.0.') if ssl_ca_file.blank?
-
oauth2_options = {access_type: 'online', name: 'google', approval_prompt: ''}
oauth2_options[:hd] = auth_domain if auth_domain.present?
oauth2_options[:client_options] = {ssl: {ca_file: ssl_ca_file}} if ssl_ca_file.present?

0 comments on commit 86b33ed

Please sign in to comment.