RoR Rails 3 Devise::SessionsController 无法对现有用户进行身份验证
- 我正在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论