重置密码链接要求用户登录 [英] Reset password link asks user to sign in
问题描述
您需要先登录或注册才能继续。
如何更改这一点,以便在点击链接时要求输入新密码?
更新:
我已经改变了我的路线,如下所示:
devise_for:users do
资源:users,:only => $($)
默认情况下,您更改了管理密码的控制器( Devise :: PasswordsController
),并添加了 before_filter:authenticate_user!
,你呢?那么你需要删除过滤器。
如果没有,你可以描述你所做的自定义设置吗?
更新:这是因为您的资源和Devise的路由冲突。这里在设计维基上你可以找到解决方案。
I am using devise for authentication. When forgot password is called it asks for mail address and it sends a link to the mail, but when I click on the link in the mail I get:
You need to sign in or sign up before continuing.
How can I change this so that when clicking on the link it asks for a new password?
UPDATE:
I have changed my routes as follows:
devise_for :users do
resources :users, :only => [:index, :new, :create, :edit, :update, :destroy]
end
It seems you changed controller that manages passwords (Devise::PasswordsController
by default) and added before_filter :authenticate_user!
in, do you? Then you need to remove the filter.
If not, can you describe customizations you done?
UPDATE: It's because of conflicting routes of your resources and Devise. Here on a devise wiki you can find solution.
这篇关于重置密码链接要求用户登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!