重置密码链接要求用户登录 [英] Reset password link asks user to sign in

查看:172
本文介绍了重置密码链接要求用户登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用devise进行身份验证。当忘记密码被称为邮件地址,并发送邮件的链接,但是当我点击邮件中的链接时,我得到:



您需要先登录或注册才能继续。



如何更改这一点,以便在点击链接时要求输入新密码?



更新:



我已经改变了我的路线,如下所示:

  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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆