ruby-on-railsherokudeviseomniauthomniauth-facebook

Omniauth Facebook Devise fails production Heroku but works in development


I developed this app on Nitrous.io (using a heroku postgresql DB). Omniauth works correctly when tested on that platform. When I try on production Heroku, I get a "The parameter app_id is required" error from facebook.

inside devise.rb

config.omniauth :facebook, ENV["FB_APP_ID"], ENV["FB_APP_SECRET"]

My facebook developer site url's and callbacks are up to date. ENV variables are by Figaro, and again, it works fine when run through Nitrous.io.


Solution

  • https://github.com/laserlemon/figaro

    Did you try the following???

    Heroku

    Heroku already makes setting application configuration easy:

    $ heroku config:set google_analytics_key=UA-35722661-5

    Using the figaro command, you can set values from your configuration file all at once:

    $ figaro heroku:set -e production

    For more information:

    $ figaro help heroku:set