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_callbacks_controller.rb
    path of file: ./repos/theodinproject/app/controllers/users
    
    the code of the file until where you have to start completion: class Users::OmniauthCallbacksController < Devise::Omni
    
  def github
    @user = UserProvider.find_user(auth)

    update_users_avatar if avatar_needs_updated?

    if @user.persisted?
      @user.remember_me = true
      sign_in_and_redirect @user
    else
      session['devise.github_data'] = auth
      redirect_to new_user_registration_url
    end