Browse Source

Merge pull request #19 from rossta/provide_options_for_provisioning_uri

Provide options for #provisioning_uri
master
Dmitrii Golub 11 years ago
parent
commit
f918008d00
  1. 4
      lib/two_factor_authentication/models/two_factor_authenticatable.rb

4
lib/two_factor_authentication/models/two_factor_authenticatable.rb

@ -35,9 +35,9 @@ module Devise
ROTP::TOTP.new(self.otp_column).at(time) ROTP::TOTP.new(self.otp_column).at(time)
end end
def provisioning_uri(account = nil) def provisioning_uri(account = nil, options = {})
account ||= self.email if self.respond_to?(:email) account ||= self.email if self.respond_to?(:email)
ROTP::TOTP.new(self.otp_column).provisioning_uri(account) ROTP::TOTP.new(self.otp_column, options).provisioning_uri(account)
end end
def otp_column def otp_column

Loading…
Cancel
Save