tadfisher / pass-otp

A pass extension for managing one-time-password (OTP) tokens
GNU General Public License v3.0
1.26k stars 86 forks source link

`insert` overwrites the entire file if an otp entry already exists #163

Closed u91o closed 2 years ago

u91o commented 2 years ago

1 2 3 otpauth://totp/OLD a b c

With the example pass file above, the current behavior of pass otp insert overwrites the entire file to be become the following:

otpauth://totp/NEW

Is this the intended behavior? If so, I think a more explicit warning is warranted considering the risk here. If not, I would like to work on a PR to resolve this.

ghost commented 1 year ago

@u91o @tadfisher

Ehm.. why was this closed, it is still an issue.

I hate this behaviour of pass-otp and in company with https://github.com/tadfisher/pass-otp/issues/169 it makes pass otp add foobar totally useless, because it is easier to just run pass edit foobar and add the otpauth:// URI manually.

At the moment I use pass-otp only to display the actual otp and nothing more.