lib/rotp/hotp.rb in rotp-6.2.2 vs lib/rotp/hotp.rb in rotp-6.3.0

- old
+ new

@@ -22,10 +22,10 @@ # This can then be encoded in a QR Code and used # to provision the Google Authenticator app # @param [String] name of the account # @param [Integer] initial_count starting counter value, defaults to 0 # @return [String] provisioning uri - def provisioning_uri(name, initial_count = 0) - OTP::URI.new(self, account_name: name, counter: initial_count).to_s + def provisioning_uri(name = nil, initial_count = 0) + OTP::URI.new(self, account_name: name || @name, counter: initial_count).to_s end end end