Sha256: 98c81bc7fb54a53e941e718c3cd83f115e2bb633afe33428ea81ef7d78831d29

Contents?: true

Size: 316 Bytes

Versions: 7

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true

class OptInTwoFactor
  extend ActiveModel::Callbacks
  include ActiveModel::Validations
  include ActiveModel::OneTimePassword

  define_model_callbacks :create
  attr_accessor :otp_secret_key, :email

  has_one_time_password unless: :otp_opt_in?

  def otp_opt_in?
    true
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active_model_otp-2.3.4 test/models/opt_in_two_factor.rb
active_model_otp-2.3.2 test/models/opt_in_two_factor.rb
active_model_otp-2.3.1 test/models/opt_in_two_factor.rb
active_model_otp-2.3.0 test/models/opt_in_two_factor.rb
active_model_otp-2.2.0 test/models/opt_in_two_factor.rb
active_model_otp-2.1.1 test/models/opt_in_two_factor.rb
active_model_otp-2.1.0 test/models/opt_in_two_factor.rb