RoR Rails 3 Devise::SessionsController 无法对现有用户进行身份验证

发布于 2024-12-12 22:42:32 字数 1540 浏览 3 评论 0原文

  • 我正在 http://localhost:3000/users/sign_in 启动应用程序
  • 接受用户/密码;发布
  • 设备无法验证我的用户并
  • 再次跳转到#new #new render sign_in,所以我陷入了循环。

这是日志:

Started POST "/users/sign_in" for 127.0.0.1 at 2011-10-30 17:49:33 -0700
      Processing by Devise::SessionsController#create as HTML
      Parameters: {"utf8"=>"✓", "authenticity_token"=>"NhVu4CQwhatever+CAErP19YVIkz0lIz3qEERac=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Sign in"}

然后它运行 SQL 来获取用户。复制/粘贴到 postgresql,“选择”获取我的用户记录。它肯定存在**

[1m[35mUser Load (5.0ms)[0m  SELECT "users".* FROM "users" WHERE "users"."email" = '[email protected]' LIMIT 1

下一个日志条目:跳转到#new - 就好像用户不存在一样

Processing by Devise::SessionsController#new as HTML
    Parameters: {"utf8"=>"✓", "authenticity_token"=>"NhVu4CQwhatever+CAErP19YVIkz0lIz3qEERac=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Sign in"}
    Rendered devise/sessions/new.html.erb within layouts/application (4.0ms)
  • I'm starting the app at http://localhost:3000/users/sign_in
  • accept user / password; posting
  • device fails to authenticate my user and jumps into #new
  • #new render sign_in again, so I am in a loop.

here is the log:

Started POST "/users/sign_in" for 127.0.0.1 at 2011-10-30 17:49:33 -0700
      Processing by Devise::SessionsController#create as HTML
      Parameters: {"utf8"=>"✓", "authenticity_token"=>"NhVu4CQwhatever+CAErP19YVIkz0lIz3qEERac=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Sign in"}

Then it runs the SQL to fetch the user. copy/pate to postgresql, the 'select' fetch my user record. it definitely exists**

[1m[35mUser Load (5.0ms)[0m  SELECT "users".* FROM "users" WHERE "users"."email" = '[email protected]' LIMIT 1

The next log entry: jumps to #new - as if the user do not exist

Processing by Devise::SessionsController#new as HTML
    Parameters: {"utf8"=>"✓", "authenticity_token"=>"NhVu4CQwhatever+CAErP19YVIkz0lIz3qEERac=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Sign in"}
    Rendered devise/sessions/new.html.erb within layouts/application (4.0ms)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文