Sha256: 0c89a10e69a8bd619ed05780e095a4a8ad0376c78e43a3abf37ebd952adfdf5f

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 KB

Contents

require 'devise'
require 'devise_two_factor/models'
require 'devise_two_factor/strategies'

module Devise
  # The length of generated OTP secrets
  mattr_accessor :otp_secret_length
  @@otp_secret_length = 128

  # The number of seconds before and after the current
  # time for which codes will be accepted
  mattr_accessor :otp_allowed_drift
  @@otp_allowed_drift = 30

  # The key used to encrypt OTP secrets in the database
  mattr_accessor :otp_secret_encryption_key
  @@otp_secret_encryption_key = nil

  # The length of all generated OTP backup codes
  mattr_accessor :otp_backup_code_length
  @@otp_backup_code_length = 16

  # The number of backup codes generated by a call to
  # generate_otp_backup_codes!
  mattr_accessor :otp_number_of_backup_codes
  @@otp_number_of_backup_codes = 5
end

Devise.add_module(:two_factor_authenticatable, :route => :session, :strategy => true,
                  :controller => :sessions, :model  => true)

Devise.add_module(:two_factor_backupable, :route => :session, :strategy => true,
                  :controller => :sessions, :model  => true)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devise-two-factor-2.1.0 lib/devise-two-factor.rb
devise-two-factor-2.0.1 lib/devise-two-factor.rb
devise-two-factor-2.0.0 lib/devise-two-factor.rb
devise-two-factor-1.1.0 lib/devise-two-factor.rb
devise-two-factor-1.0.2 lib/devise-two-factor.rb
devise-two-factor-1.0.1 lib/devise-two-factor.rb
devise-two-factor-1.0.0 lib/devise-two-factor.rb