Fix rubocop complain
This commit is contained in:
parent
cde474a49f
commit
50a2a229e7
3 changed files with 2 additions and 3 deletions
|
@ -11,7 +11,6 @@ class Profiles::TwoFactorAuthsController < ApplicationController
|
|||
def create
|
||||
if current_user.valid_otp?(params[:pin_code])
|
||||
current_user.otp_required_for_login = true
|
||||
#current_user.otp_secret = User.generate_otp_secret
|
||||
current_user.save!
|
||||
|
||||
redirect_to profile_account_path
|
||||
|
|
|
@ -58,7 +58,7 @@ require 'file_size_validator'
|
|||
|
||||
class User < ActiveRecord::Base
|
||||
devise :two_factor_authenticatable,
|
||||
:otp_secret_encryption_key => File.read(Rails.root.join('.secret')).chomp
|
||||
otp_secret_encryption_key: File.read(Rails.root.join('.secret')).chomp
|
||||
|
||||
include Sortable
|
||||
include Gitlab::ConfigHelper
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# four configuration values can also be set straight in your models.
|
||||
Devise.setup do |config|
|
||||
config.warden do |manager|
|
||||
manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable
|
||||
manager.default_strategies(scope: :user).unshift :two_factor_authenticatable
|
||||
end
|
||||
|
||||
# ==> Mailer Configuration
|
||||
|
|
Loading…
Reference in a new issue