summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/u2f_registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/u2f_registrations_controller.rb')
-rw-r--r--app/controllers/profiles/u2f_registrations_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/profiles/u2f_registrations_controller.rb b/app/controllers/profiles/u2f_registrations_controller.rb
new file mode 100644
index 00000000000..c02fe85c3cc
--- /dev/null
+++ b/app/controllers/profiles/u2f_registrations_controller.rb
@@ -0,0 +1,7 @@
+class Profiles::U2fRegistrationsController < Profiles::ApplicationController
+ def destroy
+ u2f_registration = current_user.u2f_registrations.find(params[:id])
+ u2f_registration.destroy
+ redirect_to profile_two_factor_auth_path, notice: "Successfully deleted U2F device."
+ end
+end