class UsersController < ApplicationController
  before_action :require_logged_in, only: [:show]

  def show
    @user = User.find(params[:id])
  end

  def new
  end

  def create
    @user = User.new(user_params)
    if @user.save
      log_in @user
      redirect_to @user
    else
      render 'new'
    end
  end

  private

  def user_params
    params.require(:user).permit(:name, :email, :provider, :uid, :password, :password_confirmation)
  end
end

class UsersController < ApplicationController
  before_action :require_logged_in, only: [:show]

  def show
    @user = User.find(params[:id])
  end

  def new
  end

  def create
    @user = User.new(user_params)
    @user.provider, @user.uid = "not_applicable", "not_applicable"
    if @user.save
      log_in @user
      flash[:success] = "Welcome, #{@user.name}!"
      redirect_to @user
    else
      render 'new'
    end
  end

  private

  def user_params
    params.require(:user).permit(:name, :email, :provider, :uid, :password, :password_confirmation)
  end
end

Fix sign-up issue for those that prefer regular user registration
Fix sign-up issue for those that prefer regular user registration
