gitlab-org--gitlab-foss/app/controllers/profiles/webauthn_registrations_controller.rb

11 lines
367 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Profiles::WebauthnRegistrationsController < Profiles::ApplicationController
def destroy
webauthn_registration = current_user.webauthn_registrations.find(params[:id])
webauthn_registration.destroy
redirect_to profile_two_factor_auth_path, status: :found, notice: _("Successfully deleted WebAuthn device.")
end
end