The code powering m.abunchtell.com https://m.abunchtell.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

21 行
493 B

  1. # frozen_string_literal: true
  2. module Settings
  3. module TwoFactorAuthentication
  4. class RecoveryCodesController < BaseController
  5. layout 'admin'
  6. before_action :authenticate_user!
  7. skip_before_action :require_functional!
  8. def create
  9. @recovery_codes = current_user.generate_otp_backup_codes!
  10. current_user.save!
  11. flash.now[:notice] = I18n.t('two_factor_authentication.recovery_codes_regenerated')
  12. render :index
  13. end
  14. end
  15. end
  16. end