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: omniauth.rb
    path of file: ./repos/hoboken/lib/hoboken/add_ons
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Hoboken
  module AddOns
    # OmniAuth authentication (allows you to select a provider).
    #
    class OmniAuth < ::Hoboken::Group
      attr_reader :provider

      def add_gem
        @provider = ask('Specify a provider (i.e. twitter, facebook. etc.): ').downcase
        provider_version = ask('Specify provider version: '
    
      def setup_middleware
        insert_into_file('app.rb', after: %r{require 'sinatra('|/base')}) do
          "\nrequire '#{gem_name}'\nrequire 'sinatra/json'\n"
        end

        snippet = <<~CODE
          use OmniAuth::Builder do
            provider :#{provider}, ENV.fetch('#{provider.upcase}_KEY'), ENV.fetch('#{provider.upcase}_SECRET')
          end
        CODE

        indentation = classic? ? 2 : 6
        location = /use Rack::Session::Cookie.+\n/
        insert_into_file('config/environment.rb', after: location) do
          "\n#{indent(snippet, indentation)}\n"
        end
      end