If you want to test the local host and maintain a working environment, you can:
1- Create a new Facebook application for development purposes only
2- Set the site URL field: http://localhost:3000/
3- Then edit the file /config/initializers/omniauth.rbto match the following:
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
if Rails.env.development?
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
provider :facebook, 'DEV_APP_ID', 'DEV_APP_SEVRET'
else
provider :facebook, 'DEPLOY_APP_ID', 'DEPLOY_APP_SECRET'
end
end
Finally, restart rails serverand you will be able to enter your new application.
source
share