omniauth_secrets added

This commit is contained in:
Andreas Stephanides
2013-08-25 13:53:31 +02:00
parent 3fd47351d9
commit 3db5d65ad7
3 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/config/omniauth_secrets.yml
/config/initializers/omniauth_secrets.rb /config/initializers/omniauth_secrets.rb
# See http://help.github.com/ignore-files/ for more about ignoring files. # See http://help.github.com/ignore-files/ for more about ignoring files.
# #

View File

@@ -224,7 +224,8 @@ Devise.setup do |config|
# Add a new OmniAuth provider. Check the wiki for more information on setting # Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks. # up on your models and hooks.
#config.omniauth :facebook, 'appid', 'secret' #config.omniauth :facebook, 'appid', 'secret'
secrets = YAML.load_file("#{::Rails.root.to_s}/config/omniauth_secrets.yml")
config.omniauth :facebook, secrets["facebook"]["appid"], secrets["facebook"]["secret"]
# ==> Warden configuration # ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or # If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block. # change the failure app, you can configure them inside the config.warden block.

View File

@@ -0,0 +1,4 @@
facebook:
appid: "<appid>"
secret: "<secret>"