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

class CredentialsController < ApplicationController
  def create
    create_options = relying_party.options_for_registration(
      user: {
        id: current_user.webauthn_id,
        name: current_us
    
  def create
    create_options = relying_party.options_for_registration(
      user: {
        id: current_user.webauthn_id,
        name: current_user.username,
      },
      exclude: current_user.credentials.pluck(:external_id),
      authenticator_selection: { user_verification: "required" }
    )

    session[:current_registration] = { challenge: create_options.challenge }

    respond_to do |format|
      format.json { render json: create_options }
    end
  end