app/controllers/devise_jwt_auth/passwords_controller.rb
# This action is responsible for generating password reset tokens and sending emails
This action is responsible for generating password reset tokens and sending emails
This action is responsible for generating password reset tokens and sending emails
def create
      return render_create_error_missing_email unless resource_params[:email]
      @email = get_case_insensitive_field_from_resource_params(:email)
      @resource = find_resource(:uid, @email)
      if @resource
        yield @resource if block_given?
        @resource.send_reset_password_instructions(
          email: @email,
          provider: 'email',
          redirect_url: @redirect_url
        )
        if @resource.errors.empty?
          render_create_success
        else
          render_create_error @resource.errors
        end
      else
        render_not_found_error
      end
    end
def create return render_create_error_missing_email unless resource_params [ :email ] @email = get_case_insensitive_field_from_resource_params ( :email ) @resource = find_resource ( :uid , @email ) if @resource yield @resource if block_given? @resource . send_reset_password_instructions ( email : @email , provider : 'email' , redirect_url : @redirect_url ) if @resource . errors . empty? render_create_success else render_create_error @resource . errors end else render_not_found_error end end
This action is responsible for generating password reset tokens and sending emails
This action is responsible for generating password reset tokens and sending emails