summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/webauthn_registrations_controller.rb
blob: a4a6d84f1aee73d2daad26603a73905465675838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class Profiles::WebauthnRegistrationsController < Profiles::ApplicationController
  feature_category :authentication_and_authorization

  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