Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

  • Former Member's avatar
    Former Member

    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://......

  • Former Member's avatar
    Former Member

    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

  • Former Member's avatar
    Former Member

    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.

  • Former Member's avatar
    Former Member

    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:

  • Former Member's avatar
    Former Member

    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!