correctly handle empty GOOGLE_OAUTH2_hd

This commit is contained in:
peter 2017-07-25 16:11:36 +02:00
parent 9ff5519abb
commit 9edf2bc225
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
scope: ['profile', 'email', 'youtube', 'youtube.upload'],
access_type: 'online',
name: 'google',
hd: ENV['GOOGLE_OAUTH2_HD']
hd: ENV['GOOGLE_OAUTH2_HD'].blank? ? nil : ENV['GOOGLE_OAUTH2_HD']
provider :ldap,
host: ENV['LDAP_SERVER'],
port: ENV['LDAP_PORT'],