有人可以从一个关于如何使用Authlogic重置密码的教程中解释这行代码吗?

时间:2010-10-23 01:19:49

标签: ruby-on-rails authlogic

关于如何重置忘记的密码,我正在this tutorial。这一切都有效,除了电子邮件中只有一个空行,其中URL应该会带您到页面重置密码。应该添加的行对我来说并没有多大意义。我无法解决edit_password_reset_url(user.perishable_token)实际指的是什么?有人可以向我解释一下吗?谢谢你的阅读。

def password_reset_instructions(user)  
    subject       "Password Reset Instructions"  
    from          "Binary Logic Notifier "  
    recipients    user.email  
    sent_on       Time.now  
    body          :edit_password_reset_url => edit_password_reset_url(user.perishable_token)  
end

1 个答案:

答案 0 :(得分:1)

密码重置被视为依赖于易腐令牌的资源(只能使用一次的令牌)。

在那里生成的URL将链接到用户的“重置密码”页面。

Offtopic:如果你想在整合openid / oauth时避免很多痛苦,请切换到Devise for auth。

相关问题