I have one rails app, running on Heroku, working behind two different domains. That works fine. I'd like to have Facebook authentication for both. That doesn't.
According to several different sources (stackoverflow, facebook help (well, most of the answers here)) there's no way to use the same FB API Key on two different domains. Also, there's no way to do it on your app config page.
What is a good way to do it? Devise is configured in the devise.rb initializer, shall I do a check there and have two different lines of this?
config.omniauth :facebook, "< key >", "< secret >", { :scope => '...', :strategy_class => OmniAuth::Strategies::Facebook }
But if I do that, how do I know the domain? Because I suppose request.host is not available in the scope of an initializer.