I am authenticating using OmniAuth with both Twitter and Instagram. Twitter is working well.
When I start the authentication process with the /auth/instagram request, OmniAuth is not including the client_id in the authorization header.
I have initialized OmniAuth as:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, ENV.fetch('TWITTER_CONSUMER_KEY'), ENV.fetch('TWITTER_CONSUMER_SECRET')
provider :instagram, ENV.fetch('INSTAGRAM_CLIENT_ID'), ENV.fetch('INSTAGRAM_CLIENT_SECRET')
end
When I send the /auth/instagram request, it returns:
{"code": 400, "error_type": "OAuthException",
"error_message": "You must include a valid client_id, response_type, and redirect_uri parameters"}
and shows the request uri without my client_id:
https://www.instagram.com/oauth/authorize?client_id=&redirect_uri=http://demo.herokuapp.com/auth/instagram/callback&response_type=code&scope=basic&state=952ced9482ccf34faf3e09cffd40f59548f3c5a539499723
Any help would be appreciated.