diff --git a/.gitignore b/.gitignore index a43cb4b..0747299 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/config/omniauth_secrets.yml /config/initializers/omniauth_secrets.rb # See http://help.github.com/ignore-files/ for more about ignoring files. # diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index b51a43e..3c6e41a 100755 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -224,7 +224,8 @@ Devise.setup do |config| # Add a new OmniAuth provider. Check the wiki for more information on setting # up on your models and hooks. #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 # 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. diff --git a/config/omniauth_secrets.yml.example b/config/omniauth_secrets.yml.example new file mode 100644 index 0000000..3ec8a3d --- /dev/null +++ b/config/omniauth_secrets.yml.example @@ -0,0 +1,4 @@ + +facebook: + appid: "" + secret: ""