From ba192f12e381842c90df0fab2fcb1a23cae97fc4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 27 Jan 2017 20:28:46 +0100 Subject: Added optional two-factor authentication --- app/models/user.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index 71d3ee0b8..b34144f2c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,7 +3,9 @@ class User < ApplicationRecord include Settings::Extend - devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :confirmable + devise :registerable, :recoverable, + :rememberable, :trackable, :validatable, :confirmable, + :two_factor_authenticatable, otp_secret_encryption_key: ENV['OTP_SECRET'] belongs_to :account, inverse_of: :user accepts_nested_attributes_for :account -- cgit