[ENV] GH config in secrets.yml
This commit is contained in:
parent
238d94cdc3
commit
8934d495e9
2 changed files with 4 additions and 2 deletions
|
@ -235,8 +235,7 @@ Devise.setup do |config|
|
|||
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
||||
# up on your models and hooks.
|
||||
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'
|
||||
config.omniauth :github, Rails.application.secrets.github[:client_id], Rails.application.secrets.github[:client_secret], scope: 'user:email'
|
||||
end
|
||||
|
||||
# ==> Warden configuration
|
||||
|
|
|
@ -18,6 +18,9 @@ defaults: &defaults
|
|||
token_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/token
|
||||
userinfo_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/userinfo
|
||||
logout_endpoint: <%= ENV['FC_PARTICULIER_HOST'] %>/api/v1/logout
|
||||
github:
|
||||
client_id: <%= ENV['GITHUB_CLIENT_ID'] %>
|
||||
client_secret: <%= ENV['GITHUB_CLIENT_SECRET'] %>
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
|
|
Loading…
Reference in a new issue