diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-09-20 04:16:18 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-09-20 04:16:18 +0300 |
commit | 259851c0d601632ad02a9f6ac0d59276552570b9 (patch) | |
tree | ee51f875433e2df76f88a1ae8bad83225afe6400 /app/controllers/profiles | |
parent | 69723d20024821fb4206e899ffa3acd2da690315 (diff) |
Bump devise-two-factor to 2.0.0
Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2605
See https://github.com/tinfoil/devise-two-factor/pull/43
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/two_factor_auths_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index f9af0871cf1..e6b99be37fb 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -9,7 +9,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController end def create - if current_user.valid_otp?(params[:pin_code]) + if current_user.validate_and_consume_otp!(params[:pin_code]) current_user.two_factor_enabled = true @codes = current_user.generate_otp_backup_codes! current_user.save! |