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

- old
+ new

@@ -51,11 +51,11 @@ # Returns the provisioning URI for the OTP # This can then be encoded in a QR Code and used # to provision the Google Authenticator app # @param [String] name of the account # @return [String] provisioning URI - def provisioning_uri(name) - OTP::URI.new(self, account_name: name).to_s + def provisioning_uri(name = nil) + OTP::URI.new(self, account_name: name || @name).to_s end private # Get back an array of timecodes for a period