2020-09-07 12:08:27 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Profiles::WebauthnRegistrationsController < Profiles::ApplicationController
|
2020-10-08 18:08:32 +00:00
|
|
|
feature_category :authentication_and_authorization
|
|
|
|
|
2020-09-07 12:08:27 +00:00
|
|
|
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
|