Class: QuoVadis::TwofasController
- Inherits:
-
QuoVadisController
- Object
- ApplicationController
- QuoVadisController
- QuoVadis::TwofasController
- Defined in:
- app/controllers/quo_vadis/twofas_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/controllers/quo_vadis/twofas_controller.rb', line 11 def destroy account.totp&.destroy account.recovery_codes.delete_all account.sessions.each &:reset_authenticated_with_second_factor # OWASP ASV v4.0, 2.8.6 qv.log account, Log::TWOFA_DEACTIVATED QuoVadis.notify :twofa_deactivated_notification, email: authenticated_model.email redirect_to twofa_path, notice: QuoVadis.translate('flash.2fa.invalidated'), status: :see_other end |
#show ⇒ Object
7 8 9 |
# File 'app/controllers/quo_vadis/twofas_controller.rb', line 7 def show @recovery_codes_count = account.recovery_codes.count end |