Class: Devise::Instant2faController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::Instant2faController
- Defined in:
- app/controllers/devise/instant2fa_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
12 13 14 |
# File 'app/controllers/devise/instant2fa_controller.rb', line 12 def show @hosted_page_url = session["#{resource_name}_hosted_page_url"] end |
#update ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/devise/instant2fa_controller.rb', line 16 def update render :show and return if params[:instant2faToken].nil? begin Instant2fa.confirm_verification(@resource.id.to_s, params[:instant2faToken]) after_two_factor_success_for(@resource) rescue Instant2fa::Errors::VerificationMismatch after_two_factor_fail_for(@resource) rescue Instant2fa::Errors::VerificationFailed after_two_factor_fail_for(@resource) end end |