refactor share button & add ability to disable youtube uploading

This commit is contained in:
Josh
2017-07-28 14:58:51 -04:00
parent 10c2f1f6e5
commit 949fce701c
8 changed files with 56 additions and 40 deletions

View File

@ -11,7 +11,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2,
ENV['GOOGLE_OAUTH2_ID'],
ENV['GOOGLE_OAUTH2_SECRET'],
scope: ['profile', 'email', 'youtube', 'youtube.upload'],
scope: ENV['ENABLE_YOUTUBE_UPLOADING'] == 'true' ? ['profile', 'email', 'youtube', 'youtube.upload'] : ['profile', 'email'] ,
access_type: 'online',
name: 'google',
hd: ENV['GOOGLE_OAUTH2_HD'].blank? ? nil : ENV['GOOGLE_OAUTH2_HD']