hazcod / enpass-cli

Enpass commandline client
MIT License
137 stars 31 forks source link

Support One-time code type #125

Open anton-stamenov-SWO opened 1 year ago

anton-stamenov-SWO commented 1 year ago

When type is set to -type="One-time Code", nothing is returned.

This should have 2 use cases though:

  1. return the secret behind the OTP
  2. return the OTP code and probably skip the auth for this

example:

$ enp -type="One-time Code" show <filter>
INFO[0003] > title: <filter-match>  login: XXX  cat.: XXX  OTP: otpauth://totp/XXX?secret=XXX&issuer=XXX
INFO[0003] > title: <filter-match>  login: XXX  cat.: XXX  OTP: XXX
$ enp otp <filter>
INFO[0003] > title: <filter-match> OTP: 123456
INFO[0003] > title: <filter-match> OTP: 234567
$ enp otp -title <title> # Exact single match otherwise error
123456
hazcod commented 1 week ago

@anton-stamenov-SWO Can you perhaps give me an example of what is returned in that column in the enpass database? What's the column name?

anton-stamenov-SWO commented 1 week ago

I don't know how to check the database. I'm assuming the DB column name is the same as the field name in the UI, which currently shows 'One-Time Password'. I would like to be able to see the value of this field and also when in edit mode, I would like to see this value as well.

image