【问题标题】:Devise ignores client_options authorize path设计忽略 client_options 授权路径
【发布时间】:2013-03-15 11:56:33
【问题描述】:

我将 devise on rails 3.2 与 twitter 结合使用作为omniauth 策略。 为了在不再次授权应用程序的情况下登录返回用户,我想使用推特身份验证方法Twitter API documentation 所以我需要打电话给“https://api.twitter.com/oauth/authenticate”。

但设计总是使用https://api.twitter.com/oauth/authorize,即使我确实在初始化程序中明确设置了它。

  config.omniauth :twitter, 'zsJ66OoLL1xmFNfDG+ifA', 'crRo2Gxi2wFmw3b3XXXXXX',
              :client_options => {:authorize_path => '/oauth/authenticate'}

omniauth twitter gem 也使用“options.client_options.authorize_path = '/oauth/authenticate'”验证 URL。 所以我不知道为什么设计要使用授权网址。

有人知道如何强制使用身份验证 URL 吗?

编辑

显然这似乎是一个 twitter 问题,因为我发现 twitter 正在重定向到授权 URL 事件,尽管我的用户仍然在 twitter 上登录..

【问题讨论】:

    标签: ruby-on-rails twitter devise omniauth


    【解决方案1】:

    我刚从 Twitter 上偶然发现了这篇解释问题的帖子

    “使用 Twitter 登录”流程的更改

    此更改仅允许对请求它的应用程序进行自动重定向。使用 /oauth/authenticate 并依赖登录用户的自动重定向行为的应用程序必须启用此“使用 Twitter 登录”选项。如果未启用该选项,用户将被引导至 /oauth/authorize,然后会提示完成申请批准流程。

    link to post

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-12
      • 2014-10-16
      • 2017-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-07
      相关资源
      最近更新 更多