【问题标题】:Why does Omniauth redirect to /auth/failure and not /auth/:provider/failure?为什么 Omniauth 重定向到 /auth/failure 而不是 /auth/:provider/failure?
【发布时间】:2012-03-16 17:43:11
【问题描述】:

一切都在标题中。

您知道为什么omniauth 在默认情况下每个策略都失败时会重定向到/auth/failure 吗? 如果默认为 /auth/:provider/failure,根据策略自定义错误页面会容易得多。

你怎么看?


https://github.com/intridea/omniauth/issues/588

【问题讨论】:

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


    【解决方案1】:

    您可以参考this pull request 在 OmniauthCallbacksController#failure 中执行以下操作

    strategy = params['strategy']
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-02
      • 1970-01-01
      • 2018-05-10
      • 2020-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多