My ruby on rails web app was playing nicely with Uber's api when I had the developer credentials on Uber set to localhost:3000
and localhost:3000/auth/uber/callback
. Now that I've deployed my app to heroku I updated the credentials to be https://APP-NAME.herokuapp.com
.
当我将Uber上的开发人员凭据设置为localhost:3000和localhost:3000 / auth / uber / callback时,我的ruby on rails web app与Uber的api很好地配合。现在我已将我的应用程序部署到heroku,我将凭据更新为https://APP-NAME.herokuapp.com。
The issue is that when I try to authenticate my app on Chrome (desktop) it works perfectly, but on Safari and Firefox I get an error from Uber: "The base redirect URI does not match the requested redirect". What's odd is that I also get this error when I'm using Chrome on my iPhone. Does anybody have an idea on what the issue is or how to go about troubleshooting this? I have no idea where to start. Thanks.
问题是,当我尝试在Chrome(桌面)上验证我的应用程序时,它运行正常,但在Safari和Firefox上我从Uber收到错误:“基本重定向URI与请求的重定向不匹配”。奇怪的是,当我在iPhone上使用Chrome时,我也会收到此错误。有没有人知道问题是什么或如何解决这个问题?我不知道从哪里开始。谢谢。
1 个解决方案
#1
Solved. When I visited my app on heroku Safari and Firefox were removing the https
so when I made the authentication request to Uber it did not match my credentials. In the production.rb file I added config.force_ssl = true
which causes heroku to use https
, even when people request the url without adding https
.
解决了。当我在heroku Safari*问我的应用程序时,Firefox正在删除https,因此当我向Uber发出身份验证请求时,它与我的凭据不匹配。在production.rb文件中,我添加了config.force_ssl = true,这导致heroku使用https,即使人们在不添加https的情况下请求URL也是如此。
#1
Solved. When I visited my app on heroku Safari and Firefox were removing the https
so when I made the authentication request to Uber it did not match my credentials. In the production.rb file I added config.force_ssl = true
which causes heroku to use https
, even when people request the url without adding https
.
解决了。当我在heroku Safari*问我的应用程序时,Firefox正在删除https,因此当我向Uber发出身份验证请求时,它与我的凭据不匹配。在production.rb文件中,我添加了config.force_ssl = true,这导致heroku使用https,即使人们在不添加https的情况下请求URL也是如此。