replydev / cotp

Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality.
GNU General Public License v3.0
255 stars 24 forks source link

in-UI counter increment does not persist #493

Closed kwshi closed 1 month ago

kwshi commented 1 month ago

Describe the bug

13 implemented pressing +/- in the UI to increment/decrement HOTP counters. This seems to work but doesn't appear to persist; for example, upon pressing + the counter increments, but after quitting and reopening cotp the counter is reset to the original value.

To Reproduce Steps to reproduce the behavior:

  1. add a new HOTP code, create with counter set to 0: cotp add -t hotp -c 0 -l test
  2. open UI and select the newly added code; counter should be at 0. press + to increment to 1.
  3. quit UI, reopen; counter is back at 0.

Expected behavior counter persists after restarting cotp

Screenshots (todo)

Environment (please complete the following information):

replydev commented 1 month ago

Hi @kwshi, thanks for reporting, this will be fixed in #494.

After this every HOTP counter change will prompt to save the database on exit. Since if you are using cotp from the NixOS repositories you may have to install the latest version using other channels.