0
0
Fork 0

Added optional two-factor authentication

This commit is contained in:
Eugen Rochko 2017-01-27 20:28:46 +01:00
parent 237cb41ab4
commit ba192f12e3
16 changed files with 146 additions and 15 deletions

View file

@ -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