Sha256: 60b73804f6abc9c70f2917c54b6a26b78e8aa2964feff48cf2dbfd923015df69

Contents?: true

Size: 1.07 KB

Versions: 12

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 = 24

  # 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

12 entries across 12 versions & 1 rubygems

Version Path
devise-two-factor-4.1.1 lib/devise-two-factor.rb
devise-two-factor-4.1.0 lib/devise-two-factor.rb
devise-two-factor-4.0.2 lib/devise-two-factor.rb
devise-two-factor-4.0.1 lib/devise-two-factor.rb
devise-two-factor-4.0.0 lib/devise-two-factor.rb
devise-two-factor-3.1.0 lib/devise-two-factor.rb
devise-two-factor-3.0.3 lib/devise-two-factor.rb
devise-two-factor-3.0.2 lib/devise-two-factor.rb
devise-two-factor-3.0.1 lib/devise-two-factor.rb
devise-two-factor-3.0.0 lib/devise-two-factor.rb
devise-two-factor-2.2.1 lib/devise-two-factor.rb
devise-two-factor-2.2.0 lib/devise-two-factor.rb