当我创建新记录并发送密码重置电子邮件时。其中的链接给出了这个错误
reset password token is invalid devise rails我的模型是
class Advertiser < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
after_create { |admin| admin.send_reset_password_instructions }
def password_required?
new_record? ? false : super
end结束
基本上,我从activeadmin创建新的广告客户,而不提供密码。只有在这个发出came.Otherwise的场景中,它才能正常工作。
Link genereate就是这样的
http://localhost:3000/admin/password/edit?reset_password_token=fDxVmCNjKNDiUseWGLe6BUt它会给出这样的错误
Reset password token is invalid发布于 2015-11-02 16:39:42
请参阅此解决方案。
检查数据库中的令牌是否与电子邮件中的令牌相同。Devise对令牌使用散列,您可能会得到散列版本。
https://stackoverflow.com/questions/33473222
复制相似问题