Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Safari和Firefox(但不是Chrome)上的Uber API出现不匹配的_重定向_URI错误_Ruby_Omniauth_Uber Api - Fatal编程技术网

Ruby Safari和Firefox(但不是Chrome)上的Uber API出现不匹配的_重定向_URI错误

Ruby Safari和Firefox(但不是Chrome)上的Uber API出现不匹配的_重定向_URI错误,ruby,omniauth,uber-api,Ruby,Omniauth,Uber Api,当我将Uber上的开发者凭证设置为localhost:3000和localhost:3000/auth/Uber/callback时,我的ruby-on-rails web应用程序与Uber的api配合得很好。现在我已经将我的应用程序部署到heroku,我将凭据更新为https://APP-NAME.herokuapp.com 问题是,当我尝试在Chrome(桌面)上验证我的应用程序时,它工作得很好,但在Safari和Firefox上,我从Uber得到一个错误:“基本重定向URI与请求的重定向不

当我将Uber上的开发者凭证设置为
localhost:3000
localhost:3000/auth/Uber/callback
时,我的ruby-on-rails web应用程序与Uber的api配合得很好。现在我已经将我的应用程序部署到heroku,我将凭据更新为
https://APP-NAME.herokuapp.com


问题是,当我尝试在Chrome(桌面)上验证我的应用程序时,它工作得很好,但在Safari和Firefox上,我从Uber得到一个错误:“基本重定向URI与请求的重定向不匹配”。奇怪的是,当我在iPhone上使用Chrome时,我也会遇到这个错误。有人知道问题是什么,或者如何解决这个问题吗?我不知道从哪里开始。谢谢。

问题解决了。当我在heroku Safari和Firefox上访问我的应用程序时,我正在删除
https
,因此当我向Uber发出身份验证请求时,它与我的凭据不匹配。在production.rb文件中,我添加了
config.force\u ssl=true
,这会导致heroku使用
https
,即使人们请求url时没有添加
https