Skip to main content
System
January 26, 2022
Question

[51] Trouble with OTP codes

  • January 26, 2022
  • 5 replies
  • 42 views
This discussion was created from comments split from: Stay tuned for this week!.

5 replies

January 25, 2022

Really looking forward to the app integration, looks very nice!

OTP codes now show in the human-readable output

They don't seem to work for me. I have just installed the latest version(2.0.0-beta.9) and I have an item with multiple OTP fields. I tried to select only the one I need but it returns the secret instead of the value:

item get MyItem --field OTP.prod

gives an output of otpauth://......

January 27, 2022

Hey @rknshia , thanks for trying our beta and for reaching out to us!
Indeed, this is undesired behaviour. I assume that op item get MyItem, which outputs in human readable format, returns all OTP codes to you, and not the otpauth addresses.
I will take this issue up with my team, I see how the use case of having more otp codes under the same item is not covered by the recently introduced --otp flag.
In the meantime, in case your problem is urgent, a workaround that would help you achieve the desired result would be something like:

op item get MyItem --format json --fields OTP.prod | jq -r .totp

Let me know if this helps you, and thank you, once again, for your feedback.
Keep the good suggestions coming. We're here to listen and to help you.

Best,
Horia

January 28, 2022

Hi, yeah I'm using a jq workaround right now but ideally I'd leave a third party tool out of it. I basically have quite a few commands that used the old get totp command which I'm trying to rebuild.

January 28, 2022

Thank you for the feedback. I took this up with my team, and it is currently on the roadmap. Stay tuned for the future releases! :chuffed:

February 3, 2022

Hey @rknshia !

We actually very recently implemented the op item get ITEM --otp command which behaves identically to the old op get totp command - it will return the primary (first of the item) totp field's OTP value!