The initializer for this gem is supposed to look like this:
# config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :shopify, ENV['SHOPIFY_API_KEY'], ENV['SHOPIFY_SHARED_SECRET']
end
However, in our Rails app resides a few different brands who offers the same functionality. Through out the entire app, the request.domain of a request determines which brand you are exposed to (brand1.example.com, brand2.example.com, etc.).
We can easily store brand specific credentials and redirect the users to the brand specific authorization path:
But it's less clear how we administrate having different providers for the middleware, chosen based on the visited request.domain. Any idea how to set this up?
The initializer for this gem is supposed to look like this:
However, in our Rails app resides a few different brands who offers the same functionality. Through out the entire app, the
request.domain
of a request determines which brand you are exposed to (brand1.example.com
,brand2.example.com
, etc.).We can easily store brand specific credentials and redirect the users to the brand specific authorization path:
But it's less clear how we administrate having different providers for the middleware, chosen based on the visited
request.domain
. Any idea how to set this up?