【问题标题】:omniauth-password giving invalid_credentials erroromn​​iauth-password 给出 invalid_credentials 错误
【发布时间】:2012-12-05 11:08:07
【问题描述】:

我完全按照此处所示设置了omniauth-password: https://github.com/namick/omniauth-password

但是,每次我尝试登录时都会收到一个 invalid_credentials 错误。现在,我的数据库中没有用户,所以应该创建它们吧?我有点困惑注册在哪里适合。

问题是我的控制器甚至没有被调用。这是日志。

(password) Callback phase initiated.
(password) Authentication failure! invalid_credentials encountered.

Started POST "/auth/password/callback" for 127.0.0.1 at 2012-12-05 02:34:05 -0800
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."email" = 'asd@asf.comssdf' LIMIT 1


Started GET "/auth/failure?message=invalid_credentials&strategy=password" for 127.0.0.1 at 2012-12-05 02:34:05 -0800
Processing by SessionsController#failure as HTML
  Parameters: {"message"=>"invalid_credentials", "strategy"=>"password"}
  Rendered text template (0.0ms)
Completed 200 OK in 16ms (Views: 15.4ms | ActiveRecord: 0.0ms)

任何帮助表示赞赏!

【问题讨论】:

    标签: ruby-on-rails authentication passwords omniauth credentials


    【解决方案1】:

    没有完全回答您使用omniauth-password 的具体问题,但是, 您是否考虑过使用omniauth-identity? 它是一种基于数据库的策略,使用用户名(或电子邮件)和密码凭据,并且有一个 Railscast。 并且:我成功地使它与其他策略一起使用。

    Omniauth 身份:https://github.com/intridea/omniauth-identity

    Railscast:http://railscasts.com/episodes/304-omniauth-identity

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-06
      • 2011-10-06
      • 1970-01-01
      • 2014-10-18
      • 1970-01-01
      相关资源
      最近更新 更多