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: package_iframe_behavior.rb
    path of file: ./repos/chaskiq/app/controllers/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module PackageIframeBehavior
  extend ActiveSupport::Concern

  def package_iframe
    if params[:token]
      data = CHA
    
  def handle_user_data(data)
    user_data = @app.decrypt(data["data"]["enc_data"])

    app_user = if user_data.present? && user_data[:email].present?
                 @app.app_users.users.find_by(email: user_data[:email])
               elsif data.dig("data", "enc_data", "identifier_key") && @app.compare_user_identifier(data["data"]["enc_data"])
                 @app.app_users.users.find_by(email: data.dig("data", "enc_data", "email"))
               elsif data.dig("data", "session_id").present?
                 @app.app_users.find_by(
                   session_id: data.dig("data", "session_id")
                 )
               else
                 @app.app_users.find_by(
                   session_id: cookies[cookie_namespace]
                 )
               end