Dashlane / dashlane-cli

👩‍💻 Dashlane CLI - Access your secrets in your terminal, servers and CI/CD
https://cli.dashlane.com/
Apache License 2.0
189 stars 52 forks source link

Retrieve otp from dcli read #161

Closed BenjaminOddou closed 1 year ago

BenjaminOddou commented 1 year ago

dcli read dl://<id>/otp returns

error: No matching field found for "otp" in "<id>"

when I was expecting the same behavior as dcli read dl://<id>/password. In the returned response it could be nice to have the expire time like in the dcli otp id=<id>.

Mikescops commented 1 year ago

For now the read command is stupid and simple, it's just reading the content without doing any operations on it. If you look at the full json of your secret you will see the key containing the otpUrl/otpSecret that is the seed of the otp.

Mikescops commented 1 year ago

Upcoming release will allow you to do some transformation like:

dcli read 'dl://<id>/otpSecret?otp' and this will return the current otp code