2
我使用OmniAuth同時使用Twitter和Instagram進行身份驗證。 Twitter運行良好。無法使用omniauth-instagram進行身份驗證,client_id缺失
當我使用/ auth/instagram請求開始驗證過程時,OmniAuth不在授權標頭中包含client_id。
我已經初始化OmniAuth爲:
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
當我發送/ auth /中Instagram的請求時,它返回:
{"code": 400, "error_type": "OAuthException",
"error_message": "You must include a valid client_id, response_type, and redirect_uri parameters"}
,並顯示請求URI沒有我的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
任何幫助,將不勝感激。