Sha256: d67a7d7ddbf5f6c7662d1fd19cbed5f1692c4b1e67c68aee2264e84d9b4dbd87

Contents?: true

Size: 398 Bytes

Versions: 4

Compression:

Stored size: 398 Bytes

Contents

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

  has_one_time_password

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

  def phone_number
    '14159341234'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
two_factor_authentication-1.1.4 spec/rails_app/app/models/user.rb
two_factor_authentication-1.1.3 spec/rails_app/app/models/user.rb
two_factor_authentication-1.1.1 spec/rails_app/app/models/user.rb
two_factor_authentication-1.1 spec/rails_app/app/models/user.rb