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
6 7 8 |
# File 'app/controllers/devise/instant2fa_controller.rb', line 6 def show @hosted_page_url = session["#{resource_name}_hosted_page_url"] end |
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/devise/instant2fa_controller.rb', line 10 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 |