From 987c0feef6097057c22d27ec8f422bd971b75f90 Mon Sep 17 00:00:00 2001 From: Ross Kaffenberger Date: Wed, 2 Apr 2014 15:17:13 -0400 Subject: [PATCH] provide options for #provisioning_uri options are passed to the ROTP::TOTP constructor, which currently makes use of :issuer and :interval option keys --- .../models/two_factor_authenticatable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/two_factor_authentication/models/two_factor_authenticatable.rb b/lib/two_factor_authentication/models/two_factor_authenticatable.rb index 01009a6..b4c104d 100644 --- a/lib/two_factor_authentication/models/two_factor_authenticatable.rb +++ b/lib/two_factor_authentication/models/two_factor_authenticatable.rb @@ -35,9 +35,9 @@ module Devise ROTP::TOTP.new(self.otp_column).at(time) end - def provisioning_uri(account = nil) + def provisioning_uri(account = nil, options = {}) 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 def otp_column