[Fix #1096] Github Oauth

This commit is contained in:
Mathieu Magnin 2017-12-20 15:27:33 +01:00
parent 46b14e97ed
commit 7c0fdbc9f8
7 changed files with 68 additions and 3 deletions

View file

@ -232,7 +232,10 @@ Devise.setup do |config|
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
if !Rails.env.test?
github_secrets = YAML::load_file(File.join(__dir__, '../github_secrets.yml'))
config.omniauth :github, github_secrets['client_id'], github_secrets['client_secret'], scope: 'user:email'
end
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or