Sha256: d3cf83cb86f916335d8c200e89ae3ebc8facf9923066506d8e4085706970535f

Contents?: true

Size: 362 Bytes

Versions: 5

Compression:

Stored size: 362 Bytes

Contents

class User < ActiveRecord::Base
  devise :two_factor_authenticatable, :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  has_one_time_password

  def send_two_factor_authentication_code(code)
    SMSProvider.send_message(to: phone_number, body: code)
  end

  def phone_number
    '14159341234'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
two_factor_authentication-2.2.0 spec/rails_app/app/models/user.rb
two_factor_authentication-2.1.1 spec/rails_app/app/models/user.rb
two_factor_authentication-2.1.0 spec/rails_app/app/models/user.rb
two_factor_authentication-2.0.1 spec/rails_app/app/models/user.rb
two_factor_authentication-2.0.0 spec/rails_app/app/models/user.rb