Sha256: eaec7365eed5d069f612f6e554fd4c78d97e16046d626df984abdebcbb80917f

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

require 'devise-authy/hooks/authy_authenticatable'
module Devise
  module Models
    module AuthyAuthenticatable
      extend ActiveSupport::Concern

      def with_authy_authentication?(request)
        if self.authy_id.present? && self.authy_enabled
          return true
        end

        return false
      end

      module ClassMethods
        def find_by_authy_id(authy_id)
          where(authy_id: authy_id).first
        end

        Devise::Models.config(self, :authy_remember_device, :authy_enable_onetouch)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devise-authy-2.0.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.11.1 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.11.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.10.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.9.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.8.3 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.8.2 lib/devise-authy/models/authy_authenticatable.rb