You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cancel_controller.rb
    path of file: ./repos/identity-idp/app/controllers/account_reset
    
    the code of the file until where you have to start completion: module AccountReset
  class CancelController < ApplicationController
    def show
      return render :show unless token

      result = 
    
    def create
      result = AccountReset::Cancel.new(session[:cancel_token]).call

      analytics.account_reset_cancel(**result.to_h)
      irs_attempts_api_tracker.account_reset_cancel_request

      if result.success?
        handle_success
      else
        redirect_to root_url
      end