How do you configure the Rails intridea/omniauth gem to make a HTTPS request when authenticating (using localhost)?
Is it in the specific strategy (fb, linkedin, pinterest, etc) or do I do it in the middleware config or someplace else(config/application.rb)?
You should be able to configure this in the OmniAuth::Builder
configuration, through the client_options
parameter.
You can configure custom endpoints via
client_options
hash passed toprovider
.
From the documentation for omniauth-facebook.
Example:
# config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV["APP_ID"], ENV["APP_SECRET"],
client_options: {
site: "https://graph.facebook.com/v2.0",
authorize_url: "https://www.facebook.com/v2.0/dialog/oauth"
}
end