summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/webauthn_registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/webauthn_registrations_controller.rb')
-rw-r--r--app/controllers/profiles/webauthn_registrations_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profiles/webauthn_registrations_controller.rb b/app/controllers/profiles/webauthn_registrations_controller.rb
new file mode 100644
index 00000000000..81b1dd6f710
--- /dev/null
+++ b/app/controllers/profiles/webauthn_registrations_controller.rb
@@ -0,0 +1,10 @@
+# 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