diff --git a/lib/active_model/one_time_password.rb b/lib/active_model/one_time_password.rb index f1fa352..c926abc 100644 --- a/lib/active_model/one_time_password.rb +++ b/lib/active_model/one_time_password.rb @@ -172,7 +172,7 @@ def hotp_code(options = {}) end def totp_code(options = {}) - time = if options.is_a?(Hash) ? options.fetch(:time, Time.now) : options + time = options.is_a?(Hash) ? options.fetch(:time, Time.now) : options ROTP::TOTP.new(otp_column, digits: otp_digits, interval: otp_interval).at(time) end