Devise Forgot Password for logged in user

后端 未结 3 785
天命终不由人
天命终不由人 2020-12-29 10:25

I\'m wondering if there is a manner of calling the \'forgot password\' procedure without forcing my user to log out

The case I\'m running into is: 1. a user logs in

3条回答
  •  天涯浪人
    2020-12-29 11:09

    You can use the @user.send_reset_password_instructions to generate the password reset token and send the email. If you just call the mailer directly, a password reset token won't be generated to authenticate the reset.

提交回复
热议问题