Some more tests. Fix invitation link and password reset links. After creating their account and setting a password, the user is logged in
This commit is contained in:
@@ -28,7 +28,7 @@ class PasswordsController < ApplicationController
|
||||
|
||||
private
|
||||
def set_user_by_token
|
||||
@user = User.find_by_password_reset_token!(params[:token])
|
||||
@user = User.find_by_token_for(:password_reset, params[:token])
|
||||
rescue ActiveSupport::MessageVerifier::InvalidSignature
|
||||
redirect_to new_password_path, alert: "Password reset link is invalid or has expired."
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user