Class: Admin::RecoveryCodesController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- PagesCore::BaseController
- ApplicationController
- PagesCore::AdminController
- AdminController
- Admin::RecoveryCodesController
- Defined in:
- app/controllers/admin/recovery_codes_controller.rb
Instance Attribute Summary
Attributes included from PagesCore::Authentication
Instance Method Summary collapse
Methods inherited from PagesCore::AdminController
Methods included from PagesCore::StaticCacheController
#disable_static_cache!, #static_cached?
Methods included from PagesCore::PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from PagesCore::ProcessTitler
inc_number_of_requests, original_title
Methods included from PagesCore::LocalesHelper
Methods included from PagesCore::ErrorRenderer
Methods included from PagesCore::Authentication
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/admin/recovery_codes_controller.rb', line 10 def create if @otp_secret.validate_otp!(params[:otp]) @recovery_codes = @otp_secret.regenerate_recovery_codes! else flash[:error] = t("pages_core.otp.invalid_code") redirect_to new_admin_recovery_codes_path end end |
#new ⇒ Object
8 |
# File 'app/controllers/admin/recovery_codes_controller.rb', line 8 def new; end |