<commit_before>class Citizens::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def facebook
    
    #logger.info "Facebook callback!!"
    omniauth = request.env["omniauth.auth"]
    
    #TODO Handle current_user situation
    @user = Citizen.find_for_facebook_oauth(omniauth)

    if @user.persisted?
     flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Facebook"
     sign_in_and_redirect @user, :event => :authentication
    else
     session["devise.facebook_data"] = request.env["omniauth.auth"]
     redirect_to new_citizen_registration_url
    end
  end
end<commit_msg>Code styling and naming changes.<commit_after>class Citizens::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def facebook
    omniauth = request.env["omniauth.auth"]
    
    #TODO Handle current_user situation
    @citizen = Citizen.find_for_facebook_oauth(omniauth)

    if @citizen.persisted?
      flash[:notice] = I18n.t "devise.omniauth_callbacks.success", kind: "Facebook"
      sign_in_and_redirect @citizen, event: :authentication
    else
      session["devise.facebook_data"] = request.env["omniauth.auth"]
      redirect_to new_citizen_registration_url
    end
  end
end
{'fraction_non_alphanumeric': 0.09558823529411764, 'fraction_numerical': 0.0032679738562091504, 'mean_word_length': 4.444444444444445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1886543', 'n_tokens_mistral': 404, 'n_tokens_neox': 374, 'n_words': 70}