【问题标题】:Salesforce error=redirect_uri_mismatch&error_description=redirect_uriSalesforce 错误=redirect_uri_mismatch&error_description=redirect_uri
【发布时间】:2014-10-21 05:20:05
【问题描述】:

我尝试使用 'omnioauth-salesforce' 使用 salesforce 开发人员登录的登录功能,我在连接的应用程序中提到了回调 http://localhost:3000/auth/salesforce/callback

在我的 devise.rb 中

config.omniauth :salesforce, "consumer_id","consumer_secret"

当我点击登录链接/users/auth/salesforce/ 我收到了这个错误

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

【问题讨论】:

  • 现在可以更改回调 http://localhost:3000/auth/salesforce/callback 替换此 http://localhost:3000/users/auth/salesforce/callback
  • 即使我现在也面临同样的问题,这个网址是从哪里读取的? localhost:3000/users/auth/salesforce/callback。如果它是另一个本地 url,那么 url 中需要有什么?

标签: ruby-on-rails-3 devise salesforce omniauth


【解决方案1】:

请确保在您的授权/登录重定向 URL 中包含 REDIRECT_URI 作为查询参数,并且它与连接的应用程序中提到的相同。

【讨论】:

    【解决方案2】:

    您在连接的应用程序中使用 localhost:3000 作为 salesforce 中的回调 url。它不起作用,因为 salesforce 无法识别您本地 PC 的 localhost。你应该使用像

    这样的静态IP

    https://112.167.1.64”而不是“https://localhost:3000”。

    【讨论】:

      猜你喜欢
      • 2015-07-04
      • 1970-01-01
      • 1970-01-01
      • 2021-04-22
      • 2016-04-16
      • 2018-03-21
      • 2021-06-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多