设计重置密码令牌不能为空

鲶鱼

我尝试在尝试重设密码时在我的Rails应用程序中首次出现错误“重设密码令牌不能为空”。我已在控制台中收到一封电子邮件,其中包含用于重置密码的链接。当我拉起链接并输入新密码时,出现错误“重置密码令牌不能为空”

为什么会出现此错误,我该如何解决?也在使用devise-basecamper gem

让我知道我还有什么可以发布的有用信息。

Started GET "/users/password/new" for 127.0.0.1 at 2014-01-08 22:43:09 -0600
Processing by Devise::PasswordsController#new as HTML
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  Company Load (0.2ms)  SELECT `companies`.* FROM `companies` WHERE `companies`.`account_id` = 1 LIMIT 1
   (0.3ms)  SELECT COUNT(*) FROM `applicants` WHERE `applicants`.`company_id` = 1 AND (viewed = false and archived = false and submitted = true)
  Rendered devise/passwords/new.html.erb within layouts/session (17.5ms)
Completed 200 OK in 808ms (Views: 309.2ms | ActiveRecord: 44.8ms)
Wed, 15 Jan 2014 19:04:50 CST -06:00
Wed, 08 Jan 2014 22:43:17 CST -06:00


Started POST "/users/password" for 127.0.0.1 at 2014-01-08 22:43:17 -0600
Processing by Devise::PasswordsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"96PTbxVrxaQWiXh6QXGZUyRe/7J/lLQo4hbASED1Mrs=", "user"=>{"email"=>"[email protected]", "subdomain"=>"mysubdomain"}, "submit"=>"Send me reset password instructions"}
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  Company Load (0.3ms)  SELECT `companies`.* FROM `companies` WHERE `companies`.`account_id` = 1 LIMIT 1
   (0.4ms)  SELECT COUNT(*) FROM `applicants` WHERE `applicants`.`company_id` = 1 AND (viewed = false and archived = false and submitted = true)
  CACHE (0.0ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  User Load (0.5ms)  SELECT `users`.* FROM `users` WHERE `users`.`account_id` = 1 AND `users`.`email` = '[email protected]' LIMIT 1
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 1 LIMIT 1
  Rendered devise/mailer/reset_password_instructions.html.erb (23.9ms)

Sent mail to [email protected] (32ms)
Date: Wed, 08 Jan 2014 22:43:18 -0600
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Hello [email protected]!</p>

<p>Someone has requested a link to change your password, and you can do this through the link below.</p>

<p><a href="http://mysubdomain.127.0.0.1.xip.io:3000/users/password/edit?reset_password_token=wHnYjLtLtXfU8FButP3p">Change my password</a></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>

Redirected to http://mysubdomain.127.0.0.1.xip.io:3000/login
Completed 302 Found in 536ms (ActiveRecord: 0.0ms)
Wed, 15 Jan 2014 19:04:50 CST -06:00
Wed, 08 Jan 2014 22:43:18 CST -06:00


Started GET "/login" for 127.0.0.1 at 2014-01-08 22:43:18 -0600
Processing by Devise::SessionsController#new as HTML
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  Company Load (0.2ms)  SELECT `companies`.* FROM `companies` WHERE `companies`.`account_id` = 1 LIMIT 1
   (0.3ms)  SELECT COUNT(*) FROM `applicants` WHERE `applicants`.`company_id` = 1 AND (viewed = false and archived = false and submitted = true)
  Rendered shared/_messages.html.erb (1.2ms)
  Rendered devise/sessions/new.html.erb within layouts/session (13.3ms)
Completed 200 OK in 28ms (Views: 22.1ms | ActiveRecord: 0.9ms)
Wed, 15 Jan 2014 19:04:50 CST -06:00
Wed, 08 Jan 2014 22:43:28 CST -06:00


Started GET "/users/password/edit?reset_password_token=[FILTERED]" for 127.0.0.1 at 2014-01-08 22:43:28 -0600
Processing by Devise::PasswordsController#edit as HTML
  Parameters: {"reset_password_token"=>"[FILTERED]"}
  Account Load (0.3ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  Company Load (0.3ms)  SELECT `companies`.* FROM `companies` WHERE `companies`.`account_id` = 1 LIMIT 1
   (0.7ms)  SELECT COUNT(*) FROM `applicants` WHERE `applicants`.`company_id` = 1 AND (viewed = false and archived = false and submitted = true)
  Rendered devise/passwords/edit.html.erb within layouts/session (1.8ms)
Completed 200 OK in 36ms (Views: 29.0ms | ActiveRecord: 1.3ms)
Wed, 15 Jan 2014 19:04:50 CST -06:00
Wed, 08 Jan 2014 22:43:39 CST -06:00


Started PUT "/users/password" for 127.0.0.1 at 2014-01-08 22:43:39 -0600
Processing by Devise::PasswordsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"96PTbxVrxaQWiXh6QXGZUyRe/7J/lLQo4hbASED1Mrs=", "user"=>{"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "submit"=>"Change my Password"}
  Account Load (0.4ms)  SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`subdomain` = 'mysubdomain' LIMIT 1
  Company Load (0.3ms)  SELECT `companies`.* FROM `companies` WHERE `companies`.`account_id` = 1 LIMIT 1
   (0.4ms)  SELECT COUNT(*) FROM `applicants` WHERE `applicants`.`company_id` = 1 AND (viewed = false and archived = false and submitted = true)
  Rendered devise/passwords/edit.html.erb within layouts/session (2.8ms)
Completed 200 OK in 39ms (Views: 27.9ms | ActiveRecord: 0.0ms)
beck03076

您是否获得了这样的链接?

http://localhost.com/users/password/edit?reset_password_token=GVN7DnKTVVsE15gMXaFb(删除.com)

在查询参数中看到reset_password_token吗?

同样在您设置的密码页面中,确保您有这样的行

<input class="hidden" id="user_reset_password_token" name="user[reset_password_token]" type="hidden" value="GVN7DnKTVVsE15gMXaFb" />

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

设计电子邮件和密码不能为空

来自分类Dev

设计重置密码令牌无效

来自分类Dev

确认令牌不能为空

来自分类Dev

密码不能为空,Bcrypt

来自分类Dev

验证失败:密码不能为空

来自分类Dev

停止当前密码不能为空

来自分类Dev

密码不能为空,Bcrypt | 导轨 5.1.4

来自分类Dev

验证失败:电子邮件不能为空,密码不能为空-不为空

来自分类Dev

Rails设计重置密码令牌不清楚

来自分类Dev

Rails设计重置密码令牌不清楚

来自分类Dev

设计current_user表单提交的“用户不能为空”

来自分类Dev

“ db.createUser不是函数”和“密码不能为空”

来自分类Dev

设计重置密码链接

来自分类Dev

设计:重置密码无济于事

来自分类Dev

设计密码重置错误

来自分类Dev

ReplyToId' 不能为空

来自分类Dev

身份密码重置令牌无效

来自分类Dev

如何生成重置密码令牌

来自分类Dev

出现1个错误,禁止保存该用户:密码不能为空

来自分类Dev

在Rails 4中尝试通过ActiveAdmin创建新用户时密码“不能为空”

来自分类Dev

Java异常客户端身份验证TLS:密码不能为空

来自分类Dev

“ validates_confirmation_of:password”失败,但显示“密码不能为空”消息

来自分类Dev

播种数据库时出现“密码不能为空”错误

来自分类Dev

Rails中的密码不能为空(使用has_secure_password)

来自分类Dev

RSpec-安装Devise gem后密码不能为空错误

来自分类Dev

Java异常客户端身份验证TLS:密码不能为空

来自分类Dev

“ validates_confirmation_of:password”失败,但显示“密码不能为空”消息

来自分类Dev

播种数据库时出现“密码不能为空”错误

来自分类Dev

邀请ID不能为空

Related 相关文章

热门标签

归档