summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/u2f_registrations_controller.rb
blob: e6a154fb6aa27c5c657fbd8e2c606ff806c048e3 (plain)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

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, status: 302, notice: "Successfully deleted U2F device."
  end
end