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

#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#
    
  def abort_if_already_authorized
    if service = Service.where(uid: omniauth_hash['uid']).first
      flash[:error] =  I18n.t( 'services.create.already_authorized',
                                  diaspora_id:  service.user.profile.diaspora_handle,
                                  service_name: service.provider.camelize )
      redirect_to_origin
    end